Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/mpegpicture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index 2b72346fb2..2be670cdbc 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -375,8 +375,10 @@ int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src)
if (src->hwaccel_picture_private) {
dst->hwaccel_priv_buf = av_buffer_ref(src->hwaccel_priv_buf);
- if (!dst->hwaccel_priv_buf)
+ if (!dst->hwaccel_priv_buf) {
+ ret = AVERROR(ENOMEM);
goto fail;
+ }
dst->hwaccel_picture_private = dst->hwaccel_priv_buf->data;
}