mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avformat/nutdec: Return error on EOF from get_str()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6bbb2f8f4da67af374d62403742482cc5962aa21) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
94a3d2e49c
commit
862ba8b4b4
@ -52,6 +52,8 @@ static int get_str(AVIOContext *bc, char *string, unsigned int maxlen)
|
|||||||
if (maxlen)
|
if (maxlen)
|
||||||
string[FFMIN(len, maxlen - 1)] = 0;
|
string[FFMIN(len, maxlen - 1)] = 0;
|
||||||
|
|
||||||
|
if (bc->eof_reached)
|
||||||
|
return AVERROR_EOF;
|
||||||
if (maxlen == len)
|
if (maxlen == len)
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user