MicroDVD has a "hack" for specifying the video framerate the subtitle was authored against. The demuxer reads this hint correctly, but didn't skip it correctly.
This was not noticed, because the exported packet has its duration set to 0, making it invisible (depending on the API user's rendering logic). --- now with updated tests --- libavformat/microdvddec.c | 1 + tests/ref/fate/sub-microdvd | 1 - tests/ref/fate/sub-microdvd-remux | Bin 436 -> 416 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c index ce3433c..a383905 100644 --- a/libavformat/microdvddec.c +++ b/libavformat/microdvddec.c @@ -112,6 +112,7 @@ static int microdvd_read_header(AVFormatContext *s) && frame <= 1 && fps > 3 && fps < 100) { pts_info = av_d2q(fps, 100000); has_real_fps = 1; + continue; } if (!st->codec->extradata && sscanf(line, "{DEFAULT}{}%c", &c) == 1) { st->codec->extradata = av_strdup(line + 11); diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd index f0eb331..d2170bc 100644 --- a/tests/ref/fate/sub-microdvd +++ b/tests/ref/fate/sub-microdvd @@ -10,7 +10,6 @@ Style: Default,Comic Sans MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1, [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text -Dialogue: 0,0:00:00.00,0:00:40.00,Default,,0,0,0,,25.000 FPS Dialogue: 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to diff --git a/tests/ref/fate/sub-microdvd-remux b/tests/ref/fate/sub-microdvd-remux index 7cbab62c3e8adda33c25c6ce82bcb07331efa86e..a71da99031fdc4bff13ea7124c046e761a650dc8 100644 GIT binary patch delta 10 RcmdnOynuOv{zm6QMgSE31AqVk delta 30 kcmZ3$yoGs!zOX@UwV{E5L9LOg9*|OS3kc@gs8_@Y0EJHo9RL6T -- 2.1.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel