mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gstreamer: Allocate output buffers via the encoder
This makes sure the correct allocator and configuration is used.
This commit is contained in:
parent
30e0c1e4fd
commit
85b9c8e103
1 changed files with 5 additions and 2 deletions
|
@ -656,8 +656,11 @@ gst_svtav1enc_dequeue_encoded_frames (GstSvtAv1Enc * svtav1enc,
|
||||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->output_buffer =
|
if ((ret = gst_video_encoder_allocate_output_frame(GST_VIDEO_ENCODER (svtav1enc), frame, output_buf->n_filled_len)) != GST_FLOW_OK) {
|
||||||
gst_buffer_new_allocate (NULL, output_buf->n_filled_len, NULL);
|
svt_av1_enc_release_out_buffer(&output_buf);
|
||||||
|
gst_video_codec_frame_unref (frame);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
GST_BUFFER_FLAG_SET(frame->output_buffer, GST_BUFFER_FLAG_LIVE);
|
GST_BUFFER_FLAG_SET(frame->output_buffer, GST_BUFFER_FLAG_LIVE);
|
||||||
gst_buffer_fill (frame->output_buffer, 0,
|
gst_buffer_fill (frame->output_buffer, 0,
|
||||||
output_buf->p_buffer, output_buf->n_filled_len);
|
output_buf->p_buffer, output_buf->n_filled_len);
|
||||||
|
|
Loading…
Reference in a new issue