Commit 92a26261 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rsd: Check av_new_packet() return value

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent acf23d94
...@@ -169,7 +169,9 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -169,7 +169,9 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
codec->channels > 1) { codec->channels > 1) {
int i, ch; 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 (i = 0; i < 4; i++) {
for (ch = 0; ch < codec->channels; ch++) { for (ch = 0; ch < codec->channels; ch++) {
pkt->data[ch * 8 + i * 2 + 0] = avio_r8(s->pb); pkt->data[ch * 8 + i * 2 + 0] = avio_r8(s->pb);
......
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