summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-25 08:32:33 +0200
committerwm4 <wm4@nowhere>2014-04-30 11:45:31 +0200
commit59e55bb0e1bd705fe26756b877acfde982d957aa (patch)
tree28c398bd9005746c3df80a8cdcb31af4fef09f53
parent9f46be73731b7f95e9a0e3bf7fee43eeae82de99 (diff)
downloadmpv-59e55bb0e1bd705fe26756b877acfde982d957aa.tar.bz2
mpv-59e55bb0e1bd705fe26756b877acfde982d957aa.tar.xz
demux_mkv: enable parsing for mp3
For some reason, some files appear to have broken mp3 packets, or at least in a form that libavcodec can't deal with. The audio in the sample file in question could not be decoded using libavcodec. The problematic file had variable packet sizes, and the libavcodec decoder kept printing "mp3: Header missing" for each packet it was fed. Remuxing with mkvmerge fixes the problem. The mp3 data is probably not VBR, and remuxing resulted in fixed-size mp3 frames. So I don't know why the sample file was muxed this way - it might just be incorrect. The sample file had "libmkv 0.6.4" as MuxingApp (although I could not get mkvinfo to print this element, maybe the file uses an incorrect element ID), and "HandBrake 0.9.4" as WritingApp. Note that the libmpg123 decoder does not have any issues with it. It's probably more robust, because libmpg123 was made to decode whole mp3 files, not just single frames. Fixes issue #742.
-rw-r--r--demux/demux_mkv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index d7fb04bec1..b3a106e763 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1336,7 +1336,7 @@ static struct mkv_audio_tag {
bool parse;
} mkv_audio_tags[] = {
{ MKV_A_MP2, 0, 0x0055 },
- { MKV_A_MP3, 0, 0x0055 },
+ { MKV_A_MP3, 0, 0x0055, true },
{ MKV_A_AC3, 1, 0x2000 },
{ MKV_A_EAC3, 1, MP_FOURCC('E', 'A', 'C', '3') },
{ MKV_A_DTS, 0, 0x2001 },