Commit fe74f928 authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

Added decoder_t::i_extra_picture_buffers field.

It will allow to specify the number of needed extra picture buffers due
to decoder latency.
(cherry picked from commit 74e141c59fa8013c6088be652ec67701502e1db6)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b6d998df
......@@ -102,6 +102,12 @@ struct decoder_t
void (*pf_picture_link) ( decoder_t *, picture_t * );
void (*pf_picture_unlink) ( decoder_t *, picture_t * );
/**
* Number of extra (ie in addition to the DPB) picture buffers
* needed for decoding.
*/
int i_extra_picture_buffers;
/* Audio output callbacks
* XXX use decoder_NewAudioBuffer/decoder_DeleteAudioBuffer */
aout_buffer_t *(*pf_aout_buffer_new)( decoder_t *, int );
......
......@@ -2424,7 +2424,9 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
}
p_vout = input_resource_RequestVout( p_owner->p_resource,
p_vout, &fmt,
dpb_size + 1 + DECODER_MAX_BUFFERING_COUNT,
dpb_size +
p_dec->i_extra_picture_buffers +
1 + DECODER_MAX_BUFFERING_COUNT,
true );
vlc_mutex_lock( &p_owner->lock );
p_owner->p_vout = p_vout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment