Commit 74e141c5 authored by Laurent Aimar's avatar Laurent Aimar

Added decoder_t::i_extra_picture_buffers field.

It will allow to specify the number of needed extra picture buffers due
to decoder latency.
parent 0c0c1a06
......@@ -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 );
......
......@@ -2413,7 +2413,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