[FFmpeg-devel] Patch for ticket #1138

Eelco Lempsink eelco at lempsink.nl
Tue Apr 17 15:08:31 CEST 2012


Hello,

Attached is a patch with a fix for trac issue #1138 (http://ffmpeg.org/trac/ffmpeg/ticket/1138)

When using the copy codec and the -ss option (before the input) the PTS and DTS are read from the packet.  For MKVs there is no DTS in the packet which means it is copied from the input stream.  However, the seek offset is not taken into account.

I found it a bit tricky to fix, since the first packet must have been read before the correct DTS can be determined and it depends on the format where the seek ended up exactly.  The big if statement basically checks if all values are equal to the ones set in init_input_stream and if so it assumes this is the first packet.

This is my first FFmpeg patch, so please correct me if I misunderstood something.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-for-pts-dts-errors-in-case-of-stream-copying-aft.patch
Type: application/octet-stream
Size: 1201 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120417/06fda239/attachment.obj>
-------------- next part --------------


-- 
Regards,
 
Eelco Lempsink



More information about the ffmpeg-devel mailing list