[vlc-commits] decoder: ensure that only one output is queued
Thomas Guillem
git at videolan.org
Thu Feb 9 15:57:28 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 9 11:21:59 2017 +0100| [61d88c2f168861d761889166a8a4d7fbc42e0e66] | committer: Thomas Guillem
decoder: ensure that only one output is queued
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61d88c2f168861d761889166a8a4d7fbc42e0e66
---
include/vlc_codec.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 802eeac..1f683e7 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -286,7 +286,7 @@ static inline picture_t *decoder_NewPicture( decoder_t *dec )
VLC_API void decoder_AbortPictures( decoder_t *dec, bool b_abort );
/**
- * This function queues a picture to the video output.
+ * This function queues a single picture to the video output.
*
* \note
* The caller doesn't own the picture anymore after this call (even in case of
@@ -297,12 +297,13 @@ VLC_API void decoder_AbortPictures( decoder_t *dec, bool b_abort );
*/
static inline int decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )
{
+ assert( p_pic->p_next == NULL );
assert( dec->pf_queue_video != NULL );
return dec->pf_queue_video( dec, p_pic );
}
/**
- * This function queues an audio block to the audio output.
+ * This function queues a single audio block to the audio output.
*
* \note
* The caller doesn't own the audio block anymore after this call (even in case
@@ -312,12 +313,13 @@ static inline int decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )
*/
static inline int decoder_QueueAudio( decoder_t *dec, block_t *p_aout_buf )
{
+ assert( p_aout_buf->p_next == NULL );
assert( dec->pf_queue_audio != NULL );
return dec->pf_queue_audio( dec, p_aout_buf );
}
/**
- * This function queues a subtitle to the video output.
+ * This function queues a single subtitle to the video output.
*
* \note
* The caller doesn't own the subtitle anymore after this call (even in case of
@@ -327,6 +329,7 @@ static inline int decoder_QueueAudio( decoder_t *dec, block_t *p_aout_buf )
*/
static inline int decoder_QueueSub( decoder_t *dec, subpicture_t *p_spu )
{
+ assert( p_spu->p_next == NULL );
assert( dec->pf_queue_sub != NULL );
return dec->pf_queue_sub( dec, p_spu );
}
More information about the vlc-commits
mailing list