summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index da94a4afff..f374314fba 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -676,7 +676,7 @@ int ff_get_line(AVIOContext *s, char *buf, int maxlen)
if (c && i < maxlen-1)
buf[i++] = c;
} while (c != '\n' && c != '\r' && c);
- if (c == '\r' && avio_r8(s) != '\n')
+ if (c == '\r' && avio_r8(s) != '\n' && !avio_feof(s))
avio_skip(s, -1);
buf[i] = 0;