From a13ea852673eb4bdc437d0ebd8d94182e6733e45 Mon Sep 17 00:00:00 2001 From: "J. Aaron Pendergrass" Date: Sun, 20 Mar 2011 12:48:48 +0100 Subject: [PATCH] Default to MPEG4 video/audio for unknown file types ffmpeg has issues with DRM-afflicted files, leading to the files being tagged with the unknown file type. This allows streaming those DRM-afflicted files to iTunes. --- src/filescanner.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/filescanner.c b/src/filescanner.c index 29430b75..2d78c471 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -157,6 +157,24 @@ fixup_tags(struct media_file_info *mfi) mfi->title = NULL; } + /* + * Default to mpeg4 video/audio for unknown file types + * in an attempt to allow streaming of DRM-afflicted files + */ + if (strcmp(mfi->codectype, "unkn") == 0) + { + if (mfi->has_video) + { + strcpy(mfi->codectype, "mp4v"); + strcpy(mfi->type, "m4v"); + } + else + { + strcpy(mfi->codectype, "mp4a"); + strcpy(mfi->type, "m4a"); + } + } + if (!mfi->artist) { if (mfi->orchestra && mfi->conductor)