[vlc-devel] [PATCH 2/2] decoder: update fmt_in if packetizer format changed
Thomas Guillem
thomas at gllm.fr
Wed Jul 29 13:58:21 CEST 2015
---
src/input/decoder.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 41cca5e..0eb39e6 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -990,7 +990,8 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block, bool b_flus
while( (p_packetized_block =
p_packetizer->pf_packetize( p_packetizer, p_block ? &p_block : NULL )) )
{
- if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
+ if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra
+ || !VOUT_FMTS_IDENTICAL( &p_packetizer->fmt_out.video, &p_dec->fmt_in.video ) )
{
es_format_Clean( &p_dec->fmt_in );
es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
@@ -1169,7 +1170,8 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block, bool b_flus
while( (p_packetized_block =
p_packetizer->pf_packetize( p_packetizer, p_block ? &p_block : NULL )) )
{
- if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
+ if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra
+ || !AOUT_FMTS_IDENTICAL( &p_packetizer->fmt_out.audio, &p_dec->fmt_in.audio ) )
{
es_format_Clean( &p_dec->fmt_in );
es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
--
2.1.4
More information about the vlc-devel
mailing list