Merge commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e'

* commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e':
  libopusenc: check return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/97/head
Michael Niedermayer 10 years ago
commit 3c6e148e84
  1. 4
      libavcodec/libopusenc.c

@ -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);

Loading…
Cancel
Save