[FFmpeg-cvslog] lavc/ass: honor Default style.

Clément Bœsch git at videolan.org
Fri Jun 29 20:29:53 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Jun 15 19:02:41 2012 +0200| [0e7782c08ec77739edb0b98ba5d896b45e98235f] | committer: Clément Bœsch

lavc/ass: honor Default style.

The "Default" style written in the header is ignored unless you explicit
it in the Dialogue events (it was valid, just ignored). This requires an
update of the SubRip test since the ASS output obviously changes.

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

 libavcodec/ass.c       |    4 ++--
 tests/ref/fate/sub-srt |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 51e37ac..6f1719b 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -38,7 +38,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
              "Style: Default,%s,%d,&H%x,&H%x,&H%x,&H%x,%d,%d,%d,1,1,0,%d,10,10,10,0,0\r\n"
              "\r\n"
              "[Events]\r\n"
-             "Format: Layer, Start, End, Text\r\n",
+             "Format: Layer, Start, End, Style, Text\r\n",
              font, font_size, color, color, back_color, back_color,
              -bold, -italic, -underline, alignment);
 
@@ -82,7 +82,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
             snprintf(s_end, sizeof(s_end), "9:59:59.99");
         else
             ts_to_string(s_end, sizeof(s_end), ts_start + duration);
-        len = snprintf(header, sizeof(header), "Dialogue: 0,%s,%s,",
+        len = snprintf(header, sizeof(header), "Dialogue: 0,%s,%s,Default,",
                        s_start, s_end);
     }
 
diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt
index 5a14664..ba5e50a 100644
--- a/tests/ref/fate/sub-srt
+++ b/tests/ref/fate/sub-srt
@@ -1 +1 @@
-03b2a3f7e7e83624c8e4d1b5569df758
+a246a00ed72655cb8db3eaf64a522e0d



More information about the ffmpeg-cvslog mailing list