[vlc-devel] [RFC PATCH 10/12] a52: fallback if audio output fails
Thomas Guillem
thomas at gllm.fr
Tue Jul 19 19:36:32 CEST 2016
---
modules/codec/a52.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/codec/a52.c b/modules/codec/a52.c
index 044905b..00e383e 100644
--- a/modules/codec/a52.c
+++ b/modules/codec/a52.c
@@ -146,6 +146,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
else
p_dec->pf_decode_audio = DecodeBlock;
p_dec->pf_flush = Flush;
+ p_dec->b_can_fallback = true;
return VLC_SUCCESS;
}
@@ -399,6 +400,12 @@ static block_t *GetAoutBuffer( decoder_t *p_dec )
{
decoder_sys_t *p_sys = p_dec->p_sys;
+ if( decoder_UpdateAudioFormat( p_dec ) )
+ {
+ p_dec->b_fallback = true;
+ return NULL;
+ }
+
block_t *p_buf = decoder_NewAudioBuffer( p_dec, p_sys->frame.i_samples );
if( p_buf )
{
--
2.8.1
More information about the vlc-devel
mailing list