mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
x264enc: Request buffers in allocation query
https://bugzilla.gnome.org/show_bug.cgi?id=732288
This commit is contained in:
parent
698714fc97
commit
8aea88d261
1 changed files with 13 additions and 0 deletions
|
@ -1920,8 +1920,21 @@ gst_x264_enc_finish (GstVideoEncoder * encoder)
|
|||
static gboolean
|
||||
gst_x264_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query)
|
||||
{
|
||||
GstX264Enc *self = GST_X264_ENC (encoder);
|
||||
GstVideoInfo *info;
|
||||
guint num_buffers;
|
||||
|
||||
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
|
||||
|
||||
if (!self->input_state)
|
||||
return FALSE;
|
||||
|
||||
info = &self->input_state->info;
|
||||
num_buffers = x264_encoder_maximum_delayed_frames (self->x264enc) + 1;
|
||||
|
||||
gst_query_add_allocation_pool (query, NULL, info->size, num_buffers,
|
||||
num_buffers);
|
||||
|
||||
return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder,
|
||||
query);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue