From 576c0b2a6915ca22c5948468c8b1b46dfd54539d Mon Sep 17 00:00:00 2001 From: Olivier CrĂȘte Date: Thu, 26 Jul 2018 10:48:34 -0400 Subject: av1enc: Propagate flags from encoder to GstBuffer --- ext/aom/gstav1enc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3