[FFmpeg-cvslog] microdvd: do not export framerate hint as subtitle packet

wm4 git at videolan.org
Wed Apr 8 22:51:13 CEST 2015


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Wed Apr  8 19:55:04 2015 +0200| [48f27b78f4bcb26fc214f8815427e615adbfda40] | committer: Michael Niedermayer

microdvd: do not export framerate hint as subtitle packet

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48f27b78f4bcb26fc214f8815427e615adbfda40
---

 libavformat/microdvddec.c         |    1 +
 tests/ref/fate/sub-microdvd       |   13 ++++++-------
 tests/ref/fate/sub-microdvd-remux |  Bin 436 -> 416 bytes
 3 files changed, 7 insertions(+), 7 deletions(-)

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..4a2e00c 100644
--- a/tests/ref/fate/sub-microdvd
+++ b/tests/ref/fate/sub-microdvd
@@ -7,13 +7,12 @@ PlayResY: 288
 [V4+ Styles]
 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
 Style: Default,Comic Sans MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
-
-[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
+
+[Events]
+Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
+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
 Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
 Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more crazy stuff
 Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
diff --git a/tests/ref/fate/sub-microdvd-remux b/tests/ref/fate/sub-microdvd-remux
index 7cbab62..a71da99 100644
Binary files a/tests/ref/fate/sub-microdvd-remux and b/tests/ref/fate/sub-microdvd-remux differ



More information about the ffmpeg-cvslog mailing list