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

Michael Niedermayer git at videolan.org
Thu May 21 21:26:15 CEST 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Wed May 20 17:13:15 2015 +0200| [e7e1832cfd8b64cd950aeb91a4b471953b9f09b9] | 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=e7e1832cfd8b64cd950aeb91a4b471953b9f09b9
---

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

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index c4d56ce..a0a88b3 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