Browse Source

libopusenc: check return value

CC: libav-stable@libav.org
Bug-Id: CID 739870
tags/n2.5
Vittorio Giovara 10 years ago
parent
commit
b09cf8afc5
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/libopusenc.c

+ 3
- 1
libavcodec/libopusenc.c View File

@@ -308,7 +308,9 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
int ret;

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