aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-17 22:46:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 22:47:36 +0100
commit62aec0c2d5b3ee55dc376279307e31f0d72a7b03 (patch)
treec4d4ace299ce1e7f4e13fa0680c88fc5f51da64f
parent7a7b77e6c97aabb654414044a000e8c4e9d52575 (diff)
parentfe0f4e56577a2dbd373bb50b0ae2d49e69d822fc (diff)
downloadffmpeg-62aec0c2d5b3ee55dc376279307e31f0d72a7b03.tar.gz
Merge commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc'
* commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc': avpacket: Check buffer reference Conflicts: libavcodec/avpacket.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/avpacket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 186747659d..22a2d5d57d 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -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;