aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-18 01:19:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-18 01:19:51 +0100
commit324797eb83dff7708a464e2ff61dd1551cc5c058 (patch)
treec6e1614afe0a2301d5c1873a31c8ec220034a44f
parent298f7f1fac0bd3423188f113da875ebfb040bdc8 (diff)
parentb9b689550e7531b1a2cc893d2af623e37f266936 (diff)
downloadffmpeg-324797eb83dff7708a464e2ff61dd1551cc5c058.tar.gz
Merge commit 'b9b689550e7531b1a2cc893d2af623e37f266936' into release/2.4
* commit 'b9b689550e7531b1a2cc893d2af623e37f266936': img2dec: check av_new_packet return value Conflicts: libavformat/img2dec.c See: 3f8148911c6e6e1f2a042bd4ca3ad8516a92130c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/img2dec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 2969b51e32..6f10369b8a 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -360,7 +360,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
VideoDemuxData *s = s1->priv_data;
char filename_bytes[1024];
char *filename = filename_bytes;
- int i;
+ int i, res;
int size[3] = { 0 }, ret[3] = { 0 };
AVIOContext *f[3] = { NULL };
AVCodecContext *codec = s1->streams[0]->codec;
@@ -436,8 +436,9 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
}
}
- if (av_new_packet(pkt, size[0] + size[1] + size[2]) < 0)
- return AVERROR(ENOMEM);
+ res = av_new_packet(pkt, size[0] + size[1] + size[2]);
+ if (res < 0)
+ return res;
pkt->stream_index = 0;
pkt->flags |= AV_PKT_FLAG_KEY;
if (s->ts_from_file) {