[vlc-commits] sout: transcode: check linear format after assignment

Zhao Zhili git at videolan.org
Mon Oct 7 09:59:27 CEST 2019


vlc | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri Oct  4 11:40:58 2019 +0800| [a8a6a5acbb337b4360ad37726ae1bea51217b934] | committer: Thomas Guillem

sout: transcode: check linear format after assignment

fix flac transcode failure

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8a6a5acbb337b4360ad37726ae1bea51217b934
---

 modules/stream_out/transcode/audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index 9d2c956b04..edc683a2e1 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -43,12 +43,12 @@ static int audio_update_format( decoder_t *p_dec )
     struct decoder_owner *p_owner = dec_get_owner( p_dec );
     sout_stream_id_sys_t *id = p_owner->id;
 
-    if( !AOUT_FMT_LINEAR(&p_dec->fmt_out.audio) )
-        return VLC_EGENERIC;
-
     p_dec->fmt_out.audio.i_format = p_dec->fmt_out.i_codec;
     aout_FormatPrepare( &p_dec->fmt_out.audio );
 
+    if( !AOUT_FMT_LINEAR(&p_dec->fmt_out.audio) )
+        return VLC_EGENERIC;
+
     vlc_mutex_lock(&id->fifo.lock);
     es_format_Clean( &id->decoder_out );
     es_format_Copy( &id->decoder_out, &p_dec->fmt_out );



More information about the vlc-commits mailing list