[FFmpeg-devel] [PATCH] Bluray Subtitle Support, v7 (Updated patch to v12)

Reimar Döffinger Reimar.Doeffinger
Sun Nov 8 14:22:14 CET 2009


On Sun, Nov 08, 2009 at 12:10:43PM +0000, Carl Eugen Hoyos wrote:
> Hi, an old thread:
> 
> Reimar D?ffinger <Reimar.Doeffinger <at> gmx.de> writes:
> 
> > > With the patch, subtitles are actually encoded (file size 10 times bigger),
> > > but nothing is shown on playback: Perhaps because of these messages while
> > > encoding:
> > > [xsub @ 0x141e450]No more than 4 subtitle colors supported (256 found.)
> > >     Last message repeated 6 times
> 
> > No, you need this patch, but Michael will have to comment on what is the
> > right approach (it disables empty packets for timestamp encoding for
> > subtitles, which causes the massive size increase):
> > Index: libavformat/avienc.c
> 
> My original answer suggests that this patch fixed a bug.
> Reimar, are you remembering this patch?

I am confused, r19607 seems to fix my issue with
ff_parse_specific_params, however it was applied before I even set that
patch - strange.
This is an alternative to the part that avoids the division by 0:
Index: libavcodec/options.c
===================================================================
--- libavcodec/options.c        (revision 20469)
+++ libavcodec/options.c        (working copy)
@@ -428,7 +428,7 @@
         flags= AV_OPT_FLAG_SUBTITLE_PARAM;
     av_opt_set_defaults2(s, flags, flags);
 
-    s->time_base= (AVRational){0,1};
+    s->time_base= codec_type == CODEC_TYPE_SUBTITLE ? (AVRational){1,1000} : (AVRational){0,1};
     s->get_buffer= avcodec_default_get_buffer;
     s->release_buffer= avcodec_default_release_buffer;
     s->get_format= avcodec_default_get_format;



More information about the ffmpeg-devel mailing list