diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-02-12 13:06:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:09 +0200 |
commit | e201e753688cad5bf6d7e6189ce2aba2b1e4951a (patch) | |
tree | a03a1b85ffbab8dbed22ee677c18f4ea2b1fe1e2 | |
parent | 79460c552f8d93dc8fb71f5fb3b4131b437aad70 (diff) | |
download | ffmpeg-e201e753688cad5bf6d7e6189ce2aba2b1e4951a.tar.gz |
h264: initialize H264Context.avctx in init_thread_copy
This prevents using a wrong (first thread's) AVCodecContext if decoding
a frame in the first pass over all threads fails.
(cherry picked from commit a06b0b1295c51d100101e0ca0434e199ad6de6b5)
Conflicts:
libavcodec/h264.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 5bf5039332..4d1269a5dd 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1588,6 +1588,7 @@ static int decode_init_thread_copy(AVCodecContext *avctx) memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); + h->avctx = avctx; h->context_initialized = 0; return 0; |