diff mbox

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

Message ID 20171119204635.4593-4-jstebbins@jetheaddev.com
State Superseded
Headers show

Commit Message

John Stebbins Nov. 19, 2017, 8:46 p.m. UTC
Used by movenc to fill sdtp box
---
 libavcodec/libx265.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

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