1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/rsd: Check av_new_packet() return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-10-17 12:11:16 +02:00
parent acf23d9451
commit 92a26261d1

View File

@ -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);