1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e'

* commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e':
  libopusenc: check return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-13 12:01:37 +01:00
commit 3c6e148e84

View File

@ -316,7 +316,9 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
int discard_padding;
if (frame) {
ff_af_queue_add(&opus->afq, frame);
ret = ff_af_queue_add(&opus->afq, frame);
if (ret < 0)
return ret;
if (frame->nb_samples < opus->opts.packet_size) {
audio = opus->samples;
memcpy(audio, frame->data[0], frame->nb_samples * sample_size);