summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-21 16:15:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-23 03:47:14 +0200
commit949057c95879e601bd33c8a42eeca39ced2b9a2d (patch)
tree6dd3498d92546e14583453f410f9e1e3c7c2fbdb /libavcodec
parent7444cf9a9c0b8b2bba8198af2823521c654a48f4 (diff)
avcodec/h264: do proper cleanup in ff_h264_alloc_tables() in case DPB alloc fails
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index cfe627fbe7..ed1365d1a7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -473,7 +473,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);