mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Merge commit 'e0caa1eb4e518111a81801db0d2ccdd2733ba94b'
* commit 'e0caa1eb4e518111a81801db0d2ccdd2733ba94b': matroskadec: check return values Conflicts: libavformat/matroskadec.c See: 1116491c53156dd1972eca3e65d5a3b8529c4658 Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
3ae818f6ab
@ -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--),
|
||||
|
Loading…
x
Reference in New Issue
Block a user