Commit 3ae818f6 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e0caa1eb'

* commit 'e0caa1eb':
  matroskadec: check return values

Conflicts:
	libavformat/matroskadec.c

See: 1116491cMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 45fd5935 e0caa1eb
......@@ -2328,10 +2328,15 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
}
while (track->audio.pkt_cnt) {
AVPacket *pkt = NULL;
if (!(pkt = av_mallocz(sizeof(AVPacket))) || av_new_packet(pkt, a) < 0) {
av_free(pkt);
int ret;
AVPacket *pkt = av_mallocz(sizeof(AVPacket));
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--),
......
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