AC3 and DTS Support

ffmpeg supports ac3 and dts, yet MOC doesn't show it in the music browser. Here's a small code edit to allow it.

After

else if (!strcasecmp(ext, "m4a"))
strcpy (buf, "M4A");

Put

else if (!strcasecmp(ext, "ac3"))
strcpy (buf, "AC3");
else if (!strcasecmp(ext, "dts"))
strcpy (buf, "DTS");

Replace

|| !strcasecmp(ext, "mp4");

With

|| !strcasecmp(ext, "mp4")
|| !strcasecmp(ext, "ac3")
|| !strcasecmp(ext, "dts");

For surround sound dts files, most of the channels got dropped, till i came across this hack.

/* hack for AC3 */
if (data->enc->channels > 2)
data->enc->channels = 2;

I commented it out, and now they work.

Sorry forgot the filename to edit.

Inside the moc source directory.

decoder_plugins/ffmpeg/ffmpeg.c

Additional audio formats have been added by SVN commit r2408 and
proper channel downmixing by r2409.