Merge commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc'
* commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc': avpacket: Check buffer reference Conflicts: libavcodec/avpacket.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
62aec0c2d5
@ -548,8 +548,10 @@ int av_packet_ref(AVPacket *dst, const AVPacket *src)
|
|||||||
memcpy(dst->buf->data, src->data, src->size);
|
memcpy(dst->buf->data, src->data, src->size);
|
||||||
} else {
|
} else {
|
||||||
dst->buf = av_buffer_ref(src->buf);
|
dst->buf = av_buffer_ref(src->buf);
|
||||||
if (!dst->buf)
|
if (!dst->buf) {
|
||||||
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dst->size = src->size;
|
dst->size = src->size;
|
||||||
|
Loading…
Reference in New Issue
Block a user