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

Michael Niedermayer michaelni
Fri Feb 9 00:26:15 CET 2007


On Thu, Feb 08, 2007 at 06:00:14PM -0500, Francois Oligny-Lemieux wrote:
> 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.

hmm what about using AVCodecContext.frame_number instead ?

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070209/6a25edac/attachment.pgp>

More information about the ffmpeg-devel mailing list