[Ffmpeg-devel] h264.c patch, always decoding extradata when on non avc stream

Francois Oligny-Lemieux eucloid
Fri Feb 9 00:00:14 CET 2007


Hello,

I was decoding a h.264 stream initiated with RTSP and found out that
extradata is always being processed.

The check is currently:
    if(!h->is_avc && s->avctx->extradata_size && s->picture_number==0){
        //process extra data

The problem was s->picture_number never being incremented.

So I added s->picture_number++ when outputting a frame.

Also for the sake of performance I re-ordered the if(...) line so the
s->picture_number==0 is checked first since it is the most likely check that
will fail and it will jump right away to the next block.

Thanks,
Francois Oligny-Lemieux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264.c.08feb2007.diff
Type: application/octet-stream
Size: 724 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070208/d7c34ccf/attachment.obj>



More information about the ffmpeg-devel mailing list