summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-02 16:47:56 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-03 02:51:27 +0000
commitd69d787dad77f62c89cbc7ea5d301641f45f36e3 (patch)
tree69eb88a708d9c008305fd90891ef51ec9dc0ee4a
parent56de2897a68e3a8795b0b3c593dad1c5832696e0 (diff)
downloadffmpeg-streaming-d69d787dad77f62c89cbc7ea5d301641f45f36e3.zip
ffmpeg-streaming-d69d787dad77f62c89cbc7ea5d301641f45f36e3.tar.gz
h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails
CC: libav-devel@libav.org
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index cb29d36..67c7eef 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -449,7 +449,7 @@ int ff_h264_alloc_tables(H264Context *h)
if (!h->DPB) {
h->DPB = av_mallocz_array(H264_MAX_PICTURE_COUNT, sizeof(*h->DPB));
if (!h->DPB)
- return AVERROR(ENOMEM);
+ goto fail;
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
av_frame_unref(&h->DPB[i].f);
av_frame_unref(&h->cur_pic.f);
OpenPOWER on IntegriCloud