ffmpeg: copy subtitles frame dimensions.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 9 Aug 2012 09:55:22 +0000 (11:55 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Tue, 14 Aug 2012 09:17:45 +0000 (11:17 +0200)
The sub-movtextenc ref file changes because the dimensions
(400×60) are stored by the format.

ffmpeg.c
tests/ref/fate/sub-movtextenc

index 5aeaba2..043f68c 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2188,6 +2188,10 @@ static int transcode_init(void)
                 break;
             case AVMEDIA_TYPE_SUBTITLE:
                 codec->time_base = (AVRational){1, 1000};
+                if (!codec->width) {
+                    codec->width     = input_streams[ost->source_index]->st->codec->width;
+                    codec->height    = input_streams[ost->source_index]->st->codec->height;
+                }
                 break;
             default:
                 abort();
index deafb64..8f97497 100644 (file)
@@ -1 +1 @@
-42640029a44ce4c5748e5e7ba5c189fd
+0435265a76ab2f6e66627089d76845f4