summaryrefslogtreecommitdiff
path: root/libavcodec/pthread_frame.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-10-26 13:41:12 +0200
committerAnton Khirnov <anton@khirnov.net>2016-12-14 09:06:44 +0100
commit549d0bdca53af7a6e0c612ab4b03baecf3a5878f (patch)
treec9b90d376f74d82b8b5bc95e7c06423b14b915e0 /libavcodec/pthread_frame.c
parent47e547b321338c73c21fa623789f1efbd80a297a (diff)
decode: be more explicit about storing the last packet properties
The current code stores a pointer to the packet passed to the decoder, which is then used during get_buffer() for timestamps and side data passthrough. However, since this is a pointer to user data which we do not own, storing it is potentially dangerous. It is also ill defined for the new decoding API with split input/output. Fix this problem by making an explicit internally owned copy of the packet properties.
Diffstat (limited to 'libavcodec/pthread_frame.c')
-rw-r--r--libavcodec/pthread_frame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 2736a81efe..75f4ff4624 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -656,7 +656,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
}
*copy->internal = *src->internal;
copy->internal->thread_ctx = p;
- copy->internal->pkt = &p->avpkt;
+ copy->internal->last_pkt_props = &p->avpkt;
if (!i) {
src = copy;