[FFmpeg-devel] Patch for ticket #1138

Michael Niedermayer michaelni at gmx.at
Tue Apr 24 19:10:14 CEST 2012


On Tue, Apr 24, 2012 at 12:06:20PM +0200, Eelco Lempsink wrote:
> On 17 apr. 2012, at 15:08, Eelco Lempsink wrote:
> > 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.
> > <0001-Fix-for-pts-dts-errors-in-case-of-stream-copying-aft.patch>
> 
> Reminder.

Fixed
Ive solved it very similarly to your patch but a bit different so
the code does not depend on some "distant" code setting specific
values.

thanks for the debuging work and patch!

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20120424/b06a7d49/attachment.asc>


More information about the ffmpeg-devel mailing list