Merge commit '1967cd4e4c1cd96dfa195ce14e4b212ddb70586d'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 25 Oct 2014 01:27:13 +0000 (03:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 25 Oct 2014 01:27:13 +0000 (03:27 +0200)
* commit '1967cd4e4c1cd96dfa195ce14e4b212ddb70586d':
  audiointerleave: check av_new_packet return value

Conflicts:
libavformat/audiointerleave.c

See: 3ca8a2328878ebdb203e49d0a060df1b5337a370
Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/audiointerleave.c

index 80bf7685798148928e4d049e11b18dafcee1539e..b64010ff44c940a629f9e453eda3d6248bf9691c 100644 (file)
@@ -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;