aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/takdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-06-13 21:49:18 +0000
committerPaul B Mahol <onemda@gmail.com>2013-06-13 21:49:18 +0000
commitff0bdf937568908a35d4091cb5c83a0155117ae6 (patch)
tree0a667b240470697645e22ec1289ee564cdb53501 /libavcodec/takdec.c
parentc112e36d41da5eb25af3230e2365737759e75375 (diff)
downloadffmpeg-ff0bdf937568908a35d4091cb5c83a0155117ae6.tar.gz
lavc: copy AVCodecContext for threads
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index c9c861c6e3..9e01ee02d7 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -902,6 +902,13 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
return pkt->size;
}
+static int init_thread_copy(AVCodecContext *avctx)
+{
+ TAKDecContext *s = avctx->priv_data;
+ s->avctx = avctx;
+ return 0;
+}
+
static int update_thread_context(AVCodecContext *dst,
const AVCodecContext *src)
{
@@ -931,6 +938,7 @@ AVCodec ff_tak_decoder = {
.init = tak_decode_init,
.close = tak_decode_close,
.decode = tak_decode_frame,
+ .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
.long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"),