mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/avpacket: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9f85c273a3
commit
ce35a61399
@ -546,8 +546,11 @@ int av_packet_ref(AVPacket *dst, const AVPacket *src)
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
memcpy(dst->buf->data, src->data, src->size);
|
||||
} else
|
||||
} else {
|
||||
dst->buf = av_buffer_ref(src->buf);
|
||||
if (!dst->buf)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
dst->size = src->size;
|
||||
dst->data = dst->buf->data;
|
||||
|
Loading…
Reference in New Issue
Block a user