--- picard-0.12.1+bzr1043/picard/musicdns/avcodec.c 2011-06-09 16:54:07.000000000 +0400 +++ picard-0.12.1/picard/musicdns/avcodec.c 2011-06-09 17:53:33.848953590 +0400 @@ -251,7 +251,7 @@ codec_context = NULL; for (i = 0; i < format_context->nb_streams; i++) { codec_context = (AVCodecContext *)format_context->streams[i]->codec; - if (codec_context && codec_context->codec_type == AVMEDIA_TYPE_AUDIO) + if (codec_context && codec_context->codec_type == CODEC_TYPE_AUDIO) break; } if (codec_context == NULL) { @@ -290,7 +290,7 @@ while (size > 0) { output_size = buffer_size + AVCODEC_MAX_AUDIO_FRAME_SIZE; - len = avcodec_decode_audio3(codec_context, (int16_t *)buffer_ptr, &output_size, &packet); + len = avcodec_decode_audio2(codec_context, (int16_t *)buffer_ptr, &output_size, data, size); if (len < 0) break;