[FFmpeg-cvslog] avformat/mov: fill in subtitle dimensions after parsing tkhd

Michael Niedermayer git at videolan.org
Mon Mar 17 18:45:55 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar 17 18:21:11 2014 +0100| [8ba432bc56f2d3ef534be7d3ccc1c9b3c0ea3091] | committer: Michael Niedermayer

avformat/mov: fill in subtitle dimensions after parsing tkhd

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

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

 libavformat/mov.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8f5657e..e7849c8 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3425,6 +3425,12 @@ static int mov_read_header(AVFormatContext *s)
         if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && sc->nb_frames_for_fps > 0 && sc->duration_for_fps > 0)
             av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
                       sc->time_scale*(int64_t)sc->nb_frames_for_fps, sc->duration_for_fps, INT_MAX);
+        if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
+            if (st->codec->width <= 0 && st->codec->width <= 0) {
+                st->codec->width  = sc->width;
+                st->codec->height = sc->height;
+            }
+        }
     }
 
     if (mov->trex_data) {



More information about the ffmpeg-cvslog mailing list