Commit ce35a613 authored by wm4's avatar wm4 Committed by Michael Niedermayer

lavc/avpacket: check for malloc failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9f85c273
......@@ -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;
......
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