always decode extradata when of non-avc stream (like RTSP)
authorFrancois Oligny-Lemieux <eucloid@gmail.com>
Fri, 9 Feb 2007 22:25:29 +0000 (22:25 +0000)
committerGuillaume Poirier <gpoirier@mplayerhq.hu>
Fri, 9 Feb 2007 22:25:29 +0000 (22:25 +0000)
Patch by Francois Oligny-Lemieux % eucloid A gmail P com %
Original thread:
Date: Feb 9, 2007 12:00 AM
Subject: [Ffmpeg-devel] h264.c patch, always decoding extradata when on non avc stream

Originally committed as revision 7904 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c

index d696676..5815720 100644 (file)
@@ -8314,7 +8314,7 @@ static int decode_frame(AVCodecContext *avctx,
         h->got_avcC = 1;
     }
 
-    if(!h->is_avc && s->avctx->extradata_size && s->picture_number==0){
+    if(avctx->frame_number==0 && !h->is_avc && s->avctx->extradata_size){
         if(decode_nal_units(h, s->avctx->extradata, s->avctx->extradata_size) < 0)
             return -1;
     }