diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 05ac0a16e8..94fe7d4acd 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2294,7 +2294,8 @@ static int mxf_read_header(AVFormatContext *s) } if (res < 0) { av_log(s, AV_LOG_ERROR, "error reading header metadata\n"); - return res; + ret = res; + goto fail; } break; } else {