[vlc-devel] [RFC PATH 3/3] decoder: prepare format in decoder_NewAudioBuffer
Thomas Guillem
thomas at gllm.fr
Wed Sep 21 16:58:56 CEST 2016
---
src/input/decoder.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 25a2f98..e609559 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -356,11 +356,6 @@ static int aout_update_format( decoder_t *p_dec )
msg_Err( p_dec, "failed to create audio output" );
return -1;
}
-
- p_dec->fmt_out.audio.i_bytes_per_frame =
- p_owner->fmt.audio.i_bytes_per_frame;
- p_dec->fmt_out.audio.i_frame_length =
- p_owner->fmt.audio.i_frame_length;
}
return 0;
}
@@ -597,6 +592,8 @@ block_t *decoder_NewAudioBuffer( decoder_t *dec, int samples )
if( decoder_UpdateAudioFormat( dec ) )
return NULL;
+ aout_FormatPrepare( &p_dec->fmt_out.audio );
+
assert( dec->fmt_out.audio.i_frame_length > 0
&& dec->fmt_out.audio.i_bytes_per_frame > 0 );
--
2.9.3
More information about the vlc-devel
mailing list