mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
libopusenc: check return value
CC: libav-stable@libav.org Bug-Id: CID 739870
This commit is contained in:
parent
29234f5681
commit
b09cf8afc5
@ -308,7 +308,9 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (frame) {
|
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) {
|
if (frame->nb_samples < opus->opts.packet_size) {
|
||||||
audio = opus->samples;
|
audio = opus->samples;
|
||||||
memcpy(audio, frame->data[0], frame->nb_samples * sample_size);
|
memcpy(audio, frame->data[0], frame->nb_samples * sample_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user