diff --git a/libavcodec/utils.c b/libavcodec/utils.c index a93b2bdff2..3c9f1243b2 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2299,7 +2299,7 @@ fail: frame->extended_buf = NULL; frame->nb_extended_buf = 0; } - } else if (frame->data[0]) + } else av_frame_unref(frame); }