Merge commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Nov 2014 11:01:37 +0000 (12:01 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Nov 2014 11:02:05 +0000 (12:02 +0100)
* commit 'b09cf8afc5199d359ac985ad7cea72a6a9f20e4e':
  libopusenc: check return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/libopusenc.c

index 5203729a384caf52ffa958c26a90dc84e98c33c9,84472068edd52b9d551ddcc9193436b7df9cda53..6fbb99b970bc698bf9f58e05a43850d743fad9e5
@@@ -313,10 -306,11 +313,12 @@@ static int libopus_encode(AVCodecContex
                                av_get_bytes_per_sample(avctx->sample_fmt);
      uint8_t *audio;
      int ret;
 +    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);