[FFmpeg-devel] [PATCH 05/11] lavc/ass: honor Default style.

Clément Bœsch ubitux at gmail.com
Sat Jun 23 20:56:01 CEST 2012


On Sat, Jun 23, 2012 at 12:09:56AM +0200, Stefano Sabatini wrote:
> On date Friday 2012-06-22 22:44:00 +0200, Clément Bœsch encoded:
> > ---
> >  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 4fe593e..4439e87 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);
> >      }
> 
> Looks good, but state in the commit which problem is this addressing
> (unmodified output was valid as well).

Added:
    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.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120623/6f952e09/attachment.asc>


More information about the ffmpeg-devel mailing list