matroskadec: check return values
CC: libav-stable@libav.org Bug-Id: CID 733712
This commit is contained in:
parent
3c1199c3c4
commit
e0caa1eb4e
@ -2132,8 +2132,16 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
|
||||
}
|
||||
|
||||
while (track->audio.pkt_cnt) {
|
||||
int ret;
|
||||
AVPacket *pkt = av_mallocz(sizeof(AVPacket));
|
||||
av_new_packet(pkt, a);
|
||||
if (!pkt)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
ret = av_new_packet(pkt, a);
|
||||
if (ret < 0) {
|
||||
av_free(pkt);
|
||||
return ret;
|
||||
}
|
||||
memcpy(pkt->data,
|
||||
track->audio.buf + a * (h * w / a - track->audio.pkt_cnt--),
|
||||
a);
|
||||
|
Loading…
x
Reference in New Issue
Block a user