X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdirac.c;h=527f015e11ac39070203ea4929012755c8149659;hb=ebf648d490448d511b5fe970d76040169e65ef74;hp=39df2a8847ce0343283af3c245bcc5662813285e;hpb=42f0ed67a34d9c5b9b37d00c2f46dff9d9135da2;p=ffmpeg diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c index 39df2a8847c..527f015e11a 100644 --- a/libavcodec/dirac.c +++ b/libavcodec/dirac.c @@ -349,8 +349,10 @@ int av_dirac_parse_sequence_header(AVDiracSeqHeader **pdsh, else if (dsh->version.major > 2 && log_ctx) av_log(log_ctx, AV_LOG_WARNING, "Stream may have unhandled features\n"); - if (video_format > 20U) - return AVERROR_INVALIDDATA; + if (video_format > 20U) { + ret = AVERROR_INVALIDDATA; + goto fail; + } /* Fill in defaults for the source parameters. */ dsh->width = dirac_source_parameters_defaults[video_format].width;