[FFmpeg-cvslog] avformat/nutdec: Return error on EOF from get_str()
Michael Niedermayer
git at videolan.org
Wed Jun 17 22:09:45 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed May 20 17:13:15 2015 +0200| [6ad36546709718e4add47d68d99d1246eced8c22] | 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=6ad36546709718e4add47d68d99d1246eced8c22
---
libavformat/nutdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 432e96a..82904dd 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -51,6 +51,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