aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-02-12 13:06:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 12:01:01 +0100
commitd005972995ee9b13ca6573a396cdb70808e12814 (patch)
treeee407e1063264d021477547b00ca46aaa358df31
parent94ebfef2fb69f9bc66dc17e533c5d25d68a37924 (diff)
downloadffmpeg-d005972995ee9b13ca6573a396cdb70808e12814.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 bace34be42..262ea8a608 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1699,6 +1699,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;