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

Submitted by John Stebbins on Dec. 6, 2017, 12:36 a.m.

Details

Message ID 20171206003658.20450-2-jstebbins@jetheaddev.com
State Accepted
Commit 79a744768aa6f498e4f46fca4ff01cd04eade9a5
Headers show

Commit Message

John Stebbins Dec. 6, 2017, 12:36 a.m.
Used by movenc to fill sdtp box
---
 libavcodec/libx265.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Michael Niedermayer Dec. 6, 2017, 5:23 p.m.
On Tue, Dec 05, 2017 at 04:36:58PM -0800, John Stebbins wrote:
> Used by movenc to fill sdtp box
> ---
>  libavcodec/libx265.c | 7 +++++++
>  1 file changed, 7 insertions(+)

LGTM
will apply if noone is against

[...]

Patch hide | download patch | download mbox

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;
 }