[FFmpeg-cvslog] avformat/nutdec: Return error on EOF from get_str()

Michael Niedermayer git at videolan.org
Tue Jun 2 00:50:00 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Wed May 20 17:13:15 2015 +0200| [179d850ded0f69961fbd86445da466817a7f602e] | committer: Michael Niedermayer

avformat/nutdec: Return error on EOF from get_str()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6bbb2f8f4da67af374d62403742482cc5962aa21)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/nutdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 6b3e94b..b52d7d2 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -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



More information about the ffmpeg-cvslog mailing list