summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2018-07-26 10:48:34 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2018-07-26 10:48:34 -0400
commit576c0b2a6915ca22c5948468c8b1b46dfd54539d (patch)
tree4c9d1af7135086d0f2c534c2a7d7c4645a41cee9
parent7c2170a63a442aa4bc06a6511cc29bd56b77da8c (diff)
av1enc: Propagate flags from encoder to GstBuffer
-rw-r--r--ext/aom/gstav1enc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/aom/gstav1enc.c b/ext/aom/gstav1enc.c
index 7c3f0b307..efdb1ff1a 100644
--- a/ext/aom/gstav1enc.c
+++ b/ext/aom/gstav1enc.c
@@ -342,6 +342,12 @@ gst_av1_enc_process (GstAV1Enc * encoder)
frame->output_buffer =
gst_buffer_new_wrapped (g_memdup (pkt->data.frame.buf,
pkt->data.frame.sz), pkt->data.frame.sz);
+
+ if ((pkt->data.frame.flags & AOM_FRAME_IS_DROPPABLE) != 0)
+ GST_BUFFER_FLAG_SET (frame->output_buffer, GST_BUFFER_FLAG_DROPPABLE);
+ if ((pkt->data.frame.flags & AOM_FRAME_IS_INVISIBLE) != 0)
+ GST_BUFFER_FLAG_SET (frame->output_buffer, GST_BUFFER_FLAG_DECODE_ONLY);
+
ret = gst_video_encoder_finish_frame (video_encoder, frame);
if (ret != GST_FLOW_OK)
break;