[vlc-devel] [PATCH 04/10] vlc_codec: make sure we check the return value of decoder_Update[Audio|Video]Format

Rémi Denis-Courmont remi at remlab.net
Fri Jul 7 16:57:38 CEST 2017


Le 7 juillet 2017 13:56:12 GMT+03:00, Steve Lhomme <robux4 at videolabs.io> a écrit :
>---
> include/vlc_codec.h | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/include/vlc_codec.h b/include/vlc_codec.h
>index 197486bc34..c62ccd0e94 100644
>--- a/include/vlc_codec.h
>+++ b/include/vlc_codec.h
>@@ -247,6 +247,7 @@ struct encoder_t
>  *
> * @return 0 if the video output was set up successfully, -1 otherwise.
>  */
>+VLC_USED
> static inline int decoder_UpdateVideoFormat( decoder_t *dec )
> {
>     assert( dec->fmt_in.i_cat == VIDEO_ES );
>@@ -364,6 +365,7 @@ static inline int decoder_QueueSub( decoder_t *dec,
>subpicture_t *p_spu )
>* format (fmt_out.audio). If there is currently no audio output or if
>the
>  * audio output format has changed, a new audio output will be set up.
>  * @return 0 if the audio output is working, -1 if not. */
>+VLC_USED
> static inline int decoder_UpdateAudioFormat( decoder_t *dec )
> {
>     assert(dec->fmt_in.i_cat == AUDIO_ES);
>-- 
>2.12.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

I am not sure that is correct. At least historically, it was not needed as either buffer allocation would fail safe, or buffer would be discarded upon queuing.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170707/9b293cc6/attachment.html>


More information about the vlc-devel mailing list