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.
This commit is contained in:
J. Aaron Pendergrass 2011-03-20 12:48:48 +01:00 committed by Julien BLACHE
parent 1e1952a5ef
commit a13ea85267

View File

@ -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)