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:
Michael Niedermayer 2015-02-17 22:46:59 +01:00
commit 62aec0c2d5

View File

@ -548,8 +548,10 @@ int av_packet_ref(AVPacket *dst, const AVPacket *src)
memcpy(dst->buf->data, src->data, src->size);
} else {
dst->buf = av_buffer_ref(src->buf);
if (!dst->buf)
if (!dst->buf) {
ret = AVERROR(ENOMEM);
goto fail;
}
}
dst->size = src->size;