avformat/nutdec: Return error on EOF from get_str()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 20 May 2015 15:13:15 +0000 (17:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 20 May 2015 15:20:58 +0000 (17:20 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c

index 2762db2..15a6fe3 100644 (file)
@@ -52,6 +52,8 @@ static int get_str(AVIOContext *bc, char *string, unsigned int maxlen)
     if (maxlen)
         string[FFMIN(len, maxlen - 1)] = 0;
 
+    if (bc->eof_reached)
+        return AVERROR_EOF;
     if (maxlen == len)
         return -1;
     else