[FFmpeg-devel] [PATCH] Bug in the mpeg-ts writer code

Yann Coupin yann.coupin+ffmpeg
Fri Feb 12 22:20:24 CET 2010


I sent this to ffmpeg-user but later realized that ffmpeg-devel was probably
more appropriate, so here it is.

Yann

---------- Forwarded message ----------

Hi all,

While encoding some video to a mpeg transport stream container and then
verifying the validity of the file (I had problems before the recent patch
to add bitrate null packet padding) I saw some discontinuity warnings. After
having a look at the code, the file and the ISO-13818-1 spec I saw that in
the PCR packets the continuity_counter field was incorrectly incremented.

For a packet sequence like this: "regular packet, PCR packet, regular
packet" the counter was something like 1, 2, 2 were it should have been 1,
1, 2. So I patched the mpegtsenc.c source file and now it produces correct
streams.

Attached is the patch to apply against this revision:

commit 669ef2243dcb770eb564eeba950e478678b069da
Author: kostya <kostya at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Feb 9 07:55:07 2010 +0000

    Indeo 5 decoder

    git-svn-id:
file:///var/local/repositories/ffmpeg/trunk at 216959553f0bf-9b14-0410-a0b8-cfaf0461ba5b

Feel free to comment if the patch is not up to standards with the way ffmpeg
code should be formatted.

Yann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-mpegts-discotinuity.patch
Type: application/octet-stream
Size: 1008 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100212/37e1bb3d/attachment.obj>



More information about the ffmpeg-devel mailing list