From 995e3479a6751165b90f52f4d9f59ee40269df00 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Mon, 13 Apr 2009 18:33:08 +0200 Subject: [PATCH] Fixed some AC3 file playback with a52 audio filter. Always increase i_bytes_per_frame to avoid cycling between 2 values with some files. --- modules/codec/a52.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/codec/a52.c b/modules/codec/a52.c index df5675265f..dc18ea456e 100644 --- a/modules/codec/a52.c +++ b/modules/codec/a52.c @@ -149,6 +149,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer ) p_dec->fmt_out.i_cat = AUDIO_ES; p_dec->fmt_out.i_codec = i_codec; p_dec->fmt_out.audio.i_rate = 0; /* So end_date gets initialized */ + p_dec->fmt_out.audio.i_bytes_per_frame = 0; /* Set callback */ if( b_packetizer ) @@ -364,7 +365,8 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer ) p_dec->fmt_out.audio.i_rate = p_sys->i_rate; p_dec->fmt_out.audio.i_channels = p_sys->i_channels; - p_dec->fmt_out.audio.i_bytes_per_frame = p_sys->i_frame_size; + if( p_dec->fmt_out.audio.i_bytes_per_frame < p_sys->i_frame_size ) + p_dec->fmt_out.audio.i_bytes_per_frame = p_sys->i_frame_size; p_dec->fmt_out.audio.i_frame_length = A52_FRAME_NB; p_dec->fmt_out.audio.i_original_channels = p_sys->i_channels_conf; -- 2.39.2