diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 21:21:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 21:21:11 +0400 |
commit | 8ba432bc56f2d3ef534be7d3ccc1c9b3c0ea3091 (patch) | |
tree | 53246ca4cfa6c30fefafc6156d6841aa713cf9ca /libavformat/mov.c | |
parent | b6ad5893ce585ac6d0a5a4750cba6bb700dbc902 (diff) |
avformat/mov: fill in subtitle dimensions after parsing tkhd
Sample: NeroRecodeSample.mp4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8f5657ef81..e7849c8d92 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) { |