Hi,

On Tue, Jul 12, 2011 at 3:16 PM, Alex Converse <[email protected]> wrote:
> This fixes AAC playback in ffplay.
> ---
>  libavcodec/aacdec.c |    3 ---
>  libavformat/utils.c |    9 +++------
>  2 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
> index f26a4b7..dac85c2 100644
> --- a/libavcodec/aacdec.c
> +++ b/libavcodec/aacdec.c
> @@ -568,9 +568,6 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
>     ac->m4ac.sample_rate = avctx->sample_rate;
>
>     if (avctx->extradata_size > 0) {
> -        avctx->channels    = 0;
> -        avctx->frame_size  = 0;
> -        avctx->sample_rate = 0;
>         if (decode_audio_specific_config(ac, ac->avctx, &ac->m4ac,
>                                          avctx->extradata,
>                                          avctx->extradata_size) < 0)
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index bbd1b2d..7ce84be 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -2090,7 +2090,8 @@ static int try_decode_frame(AVStream *st, AVPacket 
> *avpkt, AVDictionary **option
>             return ret;
>     }
>
> -    if(!has_codec_parameters(st->codec) || 
> !has_decode_delay_been_guessed(st)){
> +    if(!has_codec_parameters(st->codec) || 
> !has_decode_delay_been_guessed(st) ||
> +       !st->codec_info_nb_frames && st->codec->codec->capabilities & 
> CODEC_CAP_CHANNEL_CONF) {

gcc will complain about too few (brackets) here.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to