diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-02-12 13:06:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 12:01:01 +0100 |
commit | d005972995ee9b13ca6573a396cdb70808e12814 (patch) | |
tree | ee407e1063264d021477547b00ca46aaa358df31 | |
parent | 94ebfef2fb69f9bc66dc17e533c5d25d68a37924 (diff) | |
download | ffmpeg-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.c | 1 |
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; |