From: Michael Niedermayer Date: Mon, 10 Dec 2012 01:13:26 +0000 (+0100) Subject: Merge remote-tracking branch 'qatar/master' X-Git-Tag: android-x86-4.4-r1~7338 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=529d3e002642a9901ae463dea0263768dc843173;p=android-x86%2Fexternal-ffmpeg.git Merge remote-tracking branch 'qatar/master' * qatar/master: dsputil: remove unused macro WRAPPER8_16 configure: fix automatic processing of _extralibs in check_deps libvpxenc: Support forcing keyframes ac3dec: decode directly into output buffers Conflicts: libavcodec/ac3dec.c libavcodec/libvpxenc.c Merged-by: Michael Niedermayer --- 529d3e002642a9901ae463dea0263768dc843173 diff --cc libavcodec/ac3dec.c index 8e27cf7348,acefe41644..50e980bad7 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@@ -1392,12 -1388,19 +1396,21 @@@ static int ac3_decode_frame(AVCodecCont av_log(avctx, AV_LOG_ERROR, "error decoding the audio block\n"); err = 1; } - for (ch = 0; ch < s->out_channels; ch++) - memcpy(s->frame.data[ch] + blk * 1024, output[ch], 1024); + if (err) + for (ch = 0; ch < s->out_channels; ch++) + memcpy(s->outptr[channel_map[ch]], output[ch], 1024); + for (ch = 0; ch < s->out_channels; ch++) { + output[ch] = s->outptr[channel_map[ch]]; + s->outptr[channel_map[ch]] += AC3_BLOCK_SIZE; + } } + s->frame.decode_error_flags = err ? FF_DECODE_ERROR_INVALID_BITSTREAM : 0; + + /* keep last block for error concealment in next frame */ + for (ch = 0; ch < s->out_channels; ch++) + memcpy(s->output[ch], output[ch], 1024); + *got_frame_ptr = 1; *(AVFrame *)data = s->frame;