mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
codecs: Pass the max_dpb_size to new_segment virtual
On new_segment, the decoder is expected to negotiate. The decoder may want to pre-allocate the needed buffers. Pass the max_dpb_size as this is needed to determin how many buffers should be allocated.
This commit is contained in:
parent
f3f60f5a4c
commit
c6b8157dd6
3 changed files with 5 additions and 4 deletions
|
@ -1698,7 +1698,7 @@ gst_h264_decoder_process_sps (GstH264Decoder * self, GstH264SPS * sps)
|
|||
|
||||
g_assert (klass->new_sequence);
|
||||
|
||||
if (!klass->new_sequence (self, sps)) {
|
||||
if (!klass->new_sequence (self, sps, max_dpb_size)) {
|
||||
GST_ERROR_OBJECT (self, "subclass does not want accept new sequence");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@ struct _GstH264DecoderClass
|
|||
GstVideoDecoderClass parent_class;
|
||||
|
||||
gboolean (*new_sequence) (GstH264Decoder * decoder,
|
||||
const GstH264SPS * sps);
|
||||
const GstH264SPS * sps,
|
||||
gint max_dpb_size);
|
||||
|
||||
gboolean (*new_picture) (GstH264Decoder * decoder,
|
||||
GstH264Picture * picture);
|
||||
|
|
|
@ -154,7 +154,7 @@ static gboolean gst_d3d11_h264_dec_src_query (GstVideoDecoder * decoder,
|
|||
|
||||
/* GstH264Decoder */
|
||||
static gboolean gst_d3d11_h264_dec_new_sequence (GstH264Decoder * decoder,
|
||||
const GstH264SPS * sps);
|
||||
const GstH264SPS * sps, gint max_dpb_size);
|
||||
static gboolean gst_d3d11_h264_dec_new_picture (GstH264Decoder * decoder,
|
||||
GstH264Picture * picture);
|
||||
static GstFlowReturn gst_d3d11_h264_dec_output_picture (GstH264Decoder *
|
||||
|
@ -476,7 +476,7 @@ gst_d3d11_h264_dec_src_query (GstVideoDecoder * decoder, GstQuery * query)
|
|||
|
||||
static gboolean
|
||||
gst_d3d11_h264_dec_new_sequence (GstH264Decoder * decoder,
|
||||
const GstH264SPS * sps)
|
||||
const GstH264SPS * sps, gint max_dpb_size)
|
||||
{
|
||||
GstD3D11H264Dec *self = GST_D3D11_H264_DEC (decoder);
|
||||
gint crop_width, crop_height;
|
||||
|
|
Loading…
Reference in a new issue