aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/genh.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-10-17 02:44:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-17 12:56:47 +0200
commitacf23d9451e9ea014a4eddf2abdb476c4f33edc4 (patch)
tree4bd4dac6a70670332464599c7d0b5a02180432cd /libavformat/genh.c
parent58b19b6f636ef610afbe93f9229620ab87ebb160 (diff)
downloadffmpeg-acf23d9451e9ea014a4eddf2abdb476c4f33edc4.tar.gz
avformat/genh: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/genh.c')
-rw-r--r--libavformat/genh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/genh.c b/libavformat/genh.c
index 103912bf98..3a4faf9152 100644
--- a/libavformat/genh.c
+++ b/libavformat/genh.c
@@ -153,7 +153,9 @@ static int genh_read_packet(AVFormatContext *s, AVPacket *pkt)
if (avio_feof(s->pb))
return AVERROR_EOF;
- av_new_packet(pkt, 8 * codec->channels);
+ ret = av_new_packet(pkt, 8 * codec->channels);
+ if (ret < 0)
+ return ret;
for (i = 0; i < 8 / c->interleave_size; i++) {
for (ch = 0; ch < codec->channels; ch++) {
pkt->data[ch * 8 + i*c->interleave_size+0] = avio_r8(s->pb);