Commit d6095662 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'f1ed83e2'

* commit 'f1ed83e2':
  img2dec: check av_new_packet return value

Conflicts:
	libavformat/img2dec.c

See: 3f814891Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 6d2a2bfb f1ed83e2
...@@ -360,7 +360,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) ...@@ -360,7 +360,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
VideoDemuxData *s = s1->priv_data; VideoDemuxData *s = s1->priv_data;
char filename_bytes[1024]; char filename_bytes[1024];
char *filename = filename_bytes; char *filename = filename_bytes;
int i; int i, res;
int size[3] = { 0 }, ret[3] = { 0 }; int size[3] = { 0 }, ret[3] = { 0 };
AVIOContext *f[3] = { NULL }; AVIOContext *f[3] = { NULL };
AVCodecContext *codec = s1->streams[0]->codec; AVCodecContext *codec = s1->streams[0]->codec;
...@@ -436,8 +436,9 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) ...@@ -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) res = av_new_packet(pkt, size[0] + size[1] + size[2]);
return AVERROR(ENOMEM); if (res < 0)
return res;
pkt->stream_index = 0; pkt->stream_index = 0;
pkt->flags |= AV_PKT_FLAG_KEY; pkt->flags |= AV_PKT_FLAG_KEY;
if (s->ts_from_file) { if (s->ts_from_file) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment