lavc/libx265: mark disposable frames
authorJohn Stebbins <jstebbins@jetheaddev.com>
Wed, 6 Dec 2017 00:36:58 +0000 (16:36 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 7 Dec 2017 21:51:18 +0000 (22:51 +0100)
Used by movenc to fill sdtp box

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/libx265.c

index cbb106a..25ccb02 100644 (file)
@@ -342,6 +342,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;
 }