[FFmpeg-cvslog] nut: Use nut->version in the version range check

Luca Barbato git at videolan.org
Tue Jul 8 21:38:10 CEST 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Jul  7 20:48:34 2014 +0200| [52a1c32c0a86e84d43f977c5148e62975a0c6917] | committer: Luca Barbato

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

It was wrongly left unchanged when the version field had been
introduced. (c94e2e85cb6af8a570d8542a830556243bd32873)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52a1c32c0a86e84d43f977c5148e62975a0c6917
---

 libavformat/nutdec.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 838c181..8ec67ae 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -214,9 +214,10 @@ static int decode_main_header(NUTContext *nut)
     end += avio_tell(bc);
 
     nut->version = ffio_read_varlen(bc);
-    if (tmp < NUT_MIN_VERSION && tmp > NUT_MAX_VERSION) {
-        av_log(s, AV_LOG_ERROR, "Version %"PRId64" not supported.\n",
-               tmp);
+    if (nut->version < NUT_MIN_VERSION &&
+        nut->version > NUT_MAX_VERSION) {
+        av_log(s, AV_LOG_ERROR, "Version %d not supported.\n",
+               nut->version);
         return AVERROR(ENOSYS);
     }
 



More information about the ffmpeg-cvslog mailing list