[FFmpeg-devel] [PATCH] ffmpeg: ignore forward gaps for subtitles streams

Nicolas George nicolas.george at normalesup.org
Tue Aug 16 17:10:32 CEST 2011


ffmpeg: ignore forward gaps for subtitles streams

In formats that have timestamps discontinuities (like MPEG-PS), ffmpeg (the
command-line tool) detects gaps of more than 10ms (configurable) between a
packet's timestamps and the expected timestamp as a discontinuity and adjust
an offset for future adjustment.

For subtitles streams, forward gaps of several seconds, er even dozens of
minutes, are perfectly normal, but trigger this countermeasure. Thus:

./ffmpeg_g -v 10 -analyzeduration 10000000 -probesize 100000000 -copyinkf \
  -i some.vob -ac 2 -scodec dvdsub -f dvd -y /tmp/out.vob

will first print something like that:

timestamp discontinuity 28000000, new offset= -197672677.52

and shortly after fail with:

[dvd @ 0xbdbfa0] Application provided invalid, non monotonically increasing
dts to muxer in stream 2: 676800 >= 676800

The attached patch fixes that by ignoring positive gaps in subtitles
streams.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffmpeg-ignore-forward-gaps-for-subtitles-streams.patch
Type: text/x-diff
Size: 1315 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110816/5af34cf3/attachment.bin>
-------------- 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/20110816/5af34cf3/attachment.asc>


More information about the ffmpeg-devel mailing list