Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-10-26 14:41:12 +0300
committerAnton Khirnov <anton@khirnov.net>2016-12-14 11:06:44 +0300
commit549d0bdca53af7a6e0c612ab4b03baecf3a5878f (patch)
treec9b90d376f74d82b8b5bc95e7c06423b14b915e0 /libavcodec/internal.h
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/internal.h')
-rw-r--r--libavcodec/internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 4bde09ab8a..2ca7a45e81 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -131,10 +131,10 @@ typedef struct AVCodecInternal {
void *thread_ctx;
/**
- * Current packet as passed into the decoder, to avoid having to pass the
- * packet into every function.
+ * Properties (timestamps+side data) extracted from the last packet passed
+ * for decoding.
*/
- AVPacket *pkt;
+ AVPacket *last_pkt_props;
/**
* hwaccel-specific private data