[FFmpeg-devel] [PATCH 3/5] lavc: Add flag to mark packets containing trusted input

Mark Thompson sw at jkqxz.net
Fri Sep 8 00:56:17 EEST 2017


---
Also version bump.

As suggested by previous discussion around a wrapped_avframe decoder.


 doc/APIchanges       | 3 +++
 libavcodec/avcodec.h | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index b98a3419c4..26aa0b6481 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil:     2015-08-28
 
 API changes, most recent first:
 
+2017-09-xx - xxxxxxx - lavc 57.n+1.100 - avcodec.h
+  Add AV_PKT_FLAG_TRUSTED.
+
 2017-09-04 - xxxxxxx - lavc 57.105.100 - avcodec.h
   Add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL, replacing the deprecated
   HWACCEL_CODEC_CAP_EXPERIMENTAL flag.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 7708bb2adb..fdf93f9a54 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1709,6 +1709,13 @@ typedef struct AVPacket {
  * after decoding.
  **/
 #define AV_PKT_FLAG_DISCARD   0x0004
+/**
+ * The packet comes from a trusted source.
+ *
+ * Otherwise-unsafe constructs such as arbitrary pointers to data
+ * outside the packet may be followed.
+ */
+#define AV_PKT_FLAG_TRUSTED   0x0008
 
 enum AVSideDataParamChangeFlags {
     AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT  = 0x0001,
-- 
2.11.0



More information about the ffmpeg-devel mailing list