diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-17 13:11:16 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-17 13:56:47 +0300 |
commit | 92a26261d1ccc02c4fbdae2031e279009804c159 (patch) | |
tree | 1b6bec314528d0002b8ec9788fdc4ec17bfd95dc | |
parent | acf23d9451e9ea014a4eddf2abdb476c4f33edc4 (diff) |
avformat/rsd: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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); |