Commit cdc77733 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Patch by xxcv: Don't change fmt_last.audio.i_rate when FOURCC is mp4a

parent b6a2a98f
......@@ -1305,7 +1305,10 @@ static int transcode_audio_new( sout_stream_t *p_stream,
id->p_decoder->fmt_out.audio.i_bitspersample =
audio_BitsPerSample( id->p_decoder->fmt_out.i_codec );
fmt_last = id->p_decoder->fmt_out;
/* FIX decoders so we don't have to do this */
/* Fix AAC SBR changing number of channels and sampling rate */
if( !(id->p_decoder->fmt_in.i_codec == VLC_FOURCC('m','p','4','a') &&
fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate &&
fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels) )
fmt_last.audio.i_rate = id->p_decoder->fmt_in.audio.i_rate;
/*
......@@ -1345,6 +1348,15 @@ static int transcode_audio_new( sout_stream_t *p_stream,
id->p_encoder->fmt_in.audio.i_bitspersample =
audio_BitsPerSample( id->p_encoder->fmt_in.i_codec );
/* Fix AAC SBR changing number of channels and sampling rate */
if( id->p_decoder->fmt_in.i_codec == VLC_FOURCC('m','p','4','a') &&
fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate &&
fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels )
{
id->p_encoder->fmt_in.audio.i_rate = fmt_last.audio.i_rate;
id->p_encoder->fmt_out.audio.i_rate = fmt_last.audio.i_rate;
}
/* Load conversion filters */
if( fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels ||
fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment