Merge commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 21:46:59 +0000 (22:46 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 21:47:36 +0000 (22:47 +0100)
* commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc':
  avpacket: Check buffer reference

Conflicts:
libavcodec/avpacket.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/avpacket.c

index 1867476..22a2d5d 100644 (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;