[vlc-commits] Added decoder_t::i_extra_picture_buffers field.
Laurent Aimar
git at videolan.org
Tue Jan 10 22:57:30 CET 2012
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 22:45:46 2012 +0100| [74e141c59fa8013c6088be652ec67701502e1db6] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74e141c59fa8013c6088be652ec67701502e1db6
---
include/vlc_codec.h | 6 ++++++
src/input/decoder.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 0237aa4..beac8fd 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -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 );
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 891645f..6b6d7f3 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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;
More information about the vlc-commits
mailing list