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

wm4 nfxjfg at googlemail.com
Tue Apr 7 20:53:12 CEST 2015


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).
---
 libavformat/microdvddec.c | 1 +
 1 file changed, 1 insertion(+)

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);
-- 
2.1.4



More information about the ffmpeg-devel mailing list