[FFmpeg-devel] [PATCH] Fix empty G-VOP header decoding in MPEG-4

Anatoly Nenashev anatoly.nenashev
Wed Feb 9 21:30:07 CET 2011

On 08.02.2011 22:00, M?ns Rullg?rd wrote:
> Anatoly Nenashev<anatoly.nenashev at ovsoft.ru>  writes:
>> Hi all!
>> There are some cameras which send mpeg-4 streams with empty G-VOP header.
>> This part of stream looks like this:
>> ... 00 00 01 B3 00 00 00 01 B6 ...
>> Sample file uploaded in issue 2592.
>> FFmpeg reports "header damaged" and ignores first I-frame in G-VOP.
>> Attached patch fix this problem.
>> Anatoly.
>> Looking at this, I wonder why this is there at all.  The s->time_base
>> field is only used to incorrectly set the pts field of the decoded
>> frame (now I understand why those values always are wrong).  The
>> actual PTS is passed from the input packet to the pkt_pts field of the
>> output frame.
>> IMO this nonsense should be removed.  The time_code field in the
>> bitstream has nothing to do with PTS.

Hmm... So, if I understand you clearly, we just can ignore GOP header as 
done in attached patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpeg4_v2.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110209/37e8781e/attachment.bin>

More information about the ffmpeg-devel mailing list