av1enc: Propagate flags from encoder to GstBuffer

This commit is contained in:
Olivier Crête 2018-07-26 10:48:34 -04:00
parent 7c2170a63a
commit 576c0b2a69

View file

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