[FFmpeg-cvslog] ffmpeg: copy subtitles frame dimensions.

Nicolas George git at videolan.org
Tue Aug 14 11:33:23 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Aug  9 11:55:22 2012 +0200| [690ef618b1b0deae8a63ff7f3e4517c4adb70929] | committer: Nicolas George

ffmpeg: copy subtitles frame dimensions.

The sub-movtextenc ref file changes because the dimensions
(400×60) are stored by the format.

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

 ffmpeg.c                      |    4 ++++
 tests/ref/fate/sub-movtextenc |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 5aeaba2..043f68c 100644
--- 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();
diff --git a/tests/ref/fate/sub-movtextenc b/tests/ref/fate/sub-movtextenc
index deafb64..8f97497 100644
--- a/tests/ref/fate/sub-movtextenc
+++ b/tests/ref/fate/sub-movtextenc
@@ -1 +1 @@
-42640029a44ce4c5748e5e7ba5c189fd
+0435265a76ab2f6e66627089d76845f4



More information about the ffmpeg-cvslog mailing list