diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-17 12:11:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-17 12:56:47 +0200 |
commit | 92a26261d1ccc02c4fbdae2031e279009804c159 (patch) | |
tree | 1b6bec314528d0002b8ec9788fdc4ec17bfd95dc /libavformat/rsd.c | |
parent | acf23d9451e9ea014a4eddf2abdb476c4f33edc4 (diff) | |
download | ffmpeg-92a26261d1ccc02c4fbdae2031e279009804c159.tar.gz |
avformat/rsd: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rsd.c')
-rw-r--r-- | libavformat/rsd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 99912be15f..6b2016b197 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -169,7 +169,9 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt) codec->channels > 1) { int i, ch; - av_new_packet(pkt, codec->block_align); + ret = av_new_packet(pkt, codec->block_align); + if (ret < 0) + return ret; for (i = 0; i < 4; i++) { for (ch = 0; ch < codec->channels; ch++) { pkt->data[ch * 8 + i * 2 + 0] = avio_r8(s->pb); |