h264: reset nal_unit_type so that decoding frames without any nal units
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Dec 2011 17:52:56 +0000 (18:52 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Dec 2011 17:52:56 +0000 (18:52 +0100)
dont leave its value at something random.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 6d88f61..26f3a63 100644 (file)
@@ -3777,6 +3777,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
     int nals_needed=0; ///< number of NALs that need decoding before the next frame thread starts
     int nal_index;
 
+    h->nal_unit_type= 0;
+
     h->max_contexts = (HAVE_THREADS && (s->avctx->active_thread_type&FF_THREAD_SLICE)) ? avctx->thread_count : 1;
     if(!(s->flags2 & CODEC_FLAG2_CHUNKS)){
         h->current_slice = 0;