Anton Khirnov <[email protected]> writes:

>> @@ -2480,16 +2477,11 @@ static int aac_decode_frame_int(AVCodecContext 
>> *avctx, void *data,
>>              err = -1;
>>              goto fail;
>>          }
>> -
>> -        if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT)
>> -            ac->fmt_conv.float_interleave((float *)ac->frame.data[0],
>> -                                          (const float **)ac->output_data,
>> -                                          samples, avctx->channels);
>> -        else
>> -            ac->fmt_conv.float_to_int16_interleave((int16_t 
>> *)ac->frame.data[0],
>> -                                                   (const float 
>> **)ac->output_data,
>> -                                                   samples, 
>> avctx->channels);
>> -
>> +        for (ch = 0; ch < avctx->channels; ch++) {
>> +            memcpy((float *)ac->frame.extended_data[ch],
>> +                   ac->output_data[ch],
>> +                   samples * sizeof(*ac->output_data[ch]));
>> +        }
>
> No simple way to avoid the memcpy?

Simple or not, it should be done.  Every time you memcpy, god kills a kitten.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to