[FFmpeg-devel] [PATCH] ffmpeg: Preserve input subtitle packet duration.

Nicolas George nicolas.george at normalesup.org
Sun Sep 2 21:52:24 CEST 2012


Le septidi 17 fructidor, an CCXX, Philip Langdale a écrit :
> I mean something where the timing information is actually in the stream
> and the packet level timing is ignored. Obviously we're trying to move
> away from this.

Yes, we are on the same page on that.

> The changes look fine as far as fixing SRT goes, but fixing at this
> level means we need to change multiple decoders. At a glance, all the
> following need the same change:
> 
> microdvddec
> movtextdec
> samidec
> 
> (subviewerdec, jocosubdec and realtextdec are apparently already limited
> to 1/100)
> 
> The fact that we need to touch four decoders, and maybe more in the
> future makes this seem like the wrong place.

In general, this kind of remark is very valid. In this particular case you
must remember that the API for subtitles was not really designed: stuff was
added to get ASS-in-MKV playback working, and more stuff was added to get
other formats to more or less work too: it is not surprising if several
decoders have the same flaw.

Still, for end_display_time, the code can indeed be factored, it just has to
be done in avcodec_decode_subtitle. I will try to update my patches in a
near future.

> Maybe we should do the work in ff_ass_add_rect? We could pass in the
> original values and the timebase, and let it set end_display_time
> accurately.

At some point, we want to get rid of ff_ass_add_rect: making it do more work
seems like a bad idea.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120902/409f6c04/attachment.asc>


More information about the ffmpeg-devel mailing list