Commit 52a1c32c authored by Luca Barbato's avatar Luca Barbato

nut: Use nut->version in the version range check

It was wrongly left unchanged when the version field had been
introduced. (c94e2e85)
parent 79fce1ec
...@@ -214,9 +214,10 @@ static int decode_main_header(NUTContext *nut) ...@@ -214,9 +214,10 @@ static int decode_main_header(NUTContext *nut)
end += avio_tell(bc); end += avio_tell(bc);
nut->version = ffio_read_varlen(bc); nut->version = ffio_read_varlen(bc);
if (tmp < NUT_MIN_VERSION && tmp > NUT_MAX_VERSION) { if (nut->version < NUT_MIN_VERSION &&
av_log(s, AV_LOG_ERROR, "Version %"PRId64" not supported.\n", nut->version > NUT_MAX_VERSION) {
tmp); av_log(s, AV_LOG_ERROR, "Version %d not supported.\n",
nut->version);
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment