[FFmpeg-cvslog] r19646 - trunk/libavcodec/xsubdec.c

Reimar Döffinger Reimar.Doeffinger
Sat Aug 15 11:44:07 CEST 2009


On Sat, Aug 15, 2009 at 11:18:13AM +0200, Reimar D?ffinger wrote:
> On Sat, Aug 15, 2009 at 11:12:58AM +0200, reimar wrote:
> > Author: reimar
> > Date: Sat Aug 15 11:12:58 2009
> > New Revision: 19646
> > 
> > Log:
> > Fix start_display_time/end_display_time to be relative to packet pts in xsub decoder.
> > Makes no difference for the sample AVI files since they all have no packet pts values.
> 
> This is actually not working at all anyway, ffplay leaves the AVPacket pts in the stream
> time_base (which is unknown in the decoder) and ffmpeg does not set it at all.

Also great fun:
in ffmpeg.c:do_subtitle_out
        subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out,
	                                                    subtitle_out_max_size,
							    sub);
...
                pkt.pts += 90 * sub->start_display_time;

But in avcodec_encode_subtitle:
   if(sub->start_display_time) {
           av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
           return -1;
   }

If someone can explain to me WTF they thought when coming up with this
design I might be able to fix it.



More information about the ffmpeg-cvslog mailing list