diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 03:27:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 03:27:13 +0200 |
commit | 6d2a2bfb59f849fadc82374aa8463ac34444ba82 (patch) | |
tree | b7c21542e191e02a78b19b1791a661211500aebb | |
parent | 1945db1f13071aced7fcb25573980540c19156ea (diff) | |
parent | 1967cd4e4c1cd96dfa195ce14e4b212ddb70586d (diff) | |
download | ffmpeg-6d2a2bfb59f849fadc82374aa8463ac34444ba82.tar.gz |
Merge commit '1967cd4e4c1cd96dfa195ce14e4b212ddb70586d'
* commit '1967cd4e4c1cd96dfa195ce14e4b212ddb70586d':
audiointerleave: check av_new_packet return value
Conflicts:
libavformat/audiointerleave.c
See: 3ca8a2328878ebdb203e49d0a060df1b5337a370
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/audiointerleave.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c index 80bf768579..b64010ff44 100644 --- a/libavformat/audiointerleave.c +++ b/libavformat/audiointerleave.c @@ -80,13 +80,14 @@ static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt, { AVStream *st = s->streams[stream_index]; AudioInterleaveContext *aic = st->priv_data; - + int ret; int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size); if (!size || (!flush && size == av_fifo_size(aic->fifo))) return 0; - if (av_new_packet(pkt, size) < 0) - return AVERROR(ENOMEM); + ret = av_new_packet(pkt, size); + if (ret < 0) + return ret; av_fifo_generic_read(aic->fifo, pkt->data, size, NULL); pkt->dts = pkt->pts = aic->dts; |