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

Reimar Döffinger Reimar.Doeffinger
Mon Nov 9 10:41:22 CET 2009


On Mon, Nov 09, 2009 at 01:09:31AM +0000, Carl Eugen Hoyos wrote:
> Reimar D?ffinger <Reimar.Doeffinger <at> gmx.de> writes:
> 
> > > 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:
> 
> The new patch also fixes the crash when using the following command line, but
> while the original patch produced smaller files, subtitles were actually shown
> on playback;-)

It's not relevant if FFmpeg shows them, the question is if hardware
decoders show them.
FFmpeg will show them if you do this:
Index: libavformat/avidec.c
===================================================================
--- libavformat/avidec.c        (revision 20469)
+++ libavformat/avidec.c        (working copy)
@@ -769,6 +769,8 @@
 //                pkt->dts += ast->start;
             if(ast->sample_size)
                 pkt->dts /= ast->sample_size;
+            if(st->codec->codec_id == CODEC_ID_XSUB)
+                pkt->dts = AV_NOPTS_VALUE;
 //av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
             pkt->stream_index = avi->stream_index;
 




More information about the ffmpeg-devel mailing list