[vlc-commits] Added decoder_t::i_extra_picture_buffers field.
Laurent Aimar
git at videolan.org
Wed Jan 11 16:13:44 CET 2012
vlc/vlc-1.2 | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 22:45:46 2012 +0100| [fe74f9288ca33c5a967f3454c89beca2840fbe3d] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=fe74f9288ca33c5a967f3454c89beca2840fbe3d
---
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 4defa13..2e81f78 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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;
More information about the vlc-commits
mailing list