diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-16 18:52:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 19:02:17 +0100 |
commit | 7c98d284ff73b662f8f4c583018fafcdde62c111 (patch) | |
tree | 1e6dd7cf965f812a80c146ff419233ed0bc68098 /libavcodec | |
parent | c55b158b87426fe44b41601601f338f5ce41be6d (diff) | |
download | ffmpeg-7c98d284ff73b662f8f4c583018fafcdde62c111.tar.gz |
h264: reset nal_unit_type so that decoding frames without any nal units
dont leave its value at something random.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902c0904139b532ae25113fb6e34fa4c5cdf7ebc)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 0e0b164330..5a06a8a0d5 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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; |