[FFmpeg-devel] [PATCH 3/6] lavc/libx265: mark disposable frames

John Stebbins jstebbins at jetheaddev.com
Wed Dec 6 02:36:58 EET 2017


Used by movenc to fill sdtp box
---
 libavcodec/libx265.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 4456e300f2..69bfc4fdaa 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -329,6 +329,13 @@ FF_DISABLE_DEPRECATION_WARNINGS
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
+#if X265_BUILD >= 130
+    if (x265pic_out.sliceType == X265_TYPE_B)
+#else
+    if (x265pic_out.frameData.sliceType == 'b')
+#endif
+        pkt->flags |= AV_PKT_FLAG_DISPOSABLE;
+
     *got_packet = 1;
     return 0;
 }
-- 
2.14.3



More information about the ffmpeg-devel mailing list