aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-02-12 13:06:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 01:52:51 +0100
commit84341627d795a330cd9edf291b6d62e5cea383e0 (patch)
tree7b6a00bbdc1e68d230428821670f24bac06210f2
parent4f694182e0c896c8bc7b11225c6caab19ba86e1d (diff)
downloadffmpeg-84341627d795a330cd9edf291b6d62e5cea383e0.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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 438c43f613..ac8adf3b11 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -727,6 +727,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->rbsp_buffer[0] = NULL;
h->rbsp_buffer[1] = NULL;
h->rbsp_buffer_size[0] = 0;