[FFmpeg-devel] [PATCH] fix reading first mpegps packet

Michael Niedermayer michaelni at gmx.at
Sun Sep 18 02:59:22 CEST 2011

On Sun, Sep 18, 2011 at 02:23:02AM +0200, Reimar Döffinger wrote:
> On 17 Sep 2011, at 14:59, Arne de Bruijn <mail at arnedebruijn.nl> wrote:
> > The first packet of mpeg pes files (starting with 00 00 01 e0) is ignored by
> > ffmpeg because the sofdec-detection in mpegps_read_header eats the first
> > byte. This patch adds a seek to prevent this problem (apparently the
> > existing code tries to solve this by modifying m->header_state but this
> > doesn't help since m->header_state is overwritten at the start of
> > mpegps_read_pes_header).
> Won't that solution keep the problem around in case of stream/piping input so it is not seekable?

its the very start of the file so failure would implicate that the
buffer is less than 6 bytes. This seems unlikely to me
even more so as more is needed for probing

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20110918/92b4f6c6/attachment.asc>

More information about the ffmpeg-devel mailing list