diff options
author | Peter Ross <pross@xvid.org> | 2012-09-02 11:37:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-04 08:12:10 +0400 |
commit | bf959ac2c68111449cfdfb550a08ef37a537c994 (patch) | |
tree | 2252093b9d8f0c9c6fdd2173c37213225197827d /libavformat/tty.c | |
parent | 688cb7125274e3b651ec2113ffe5a68dea8d9bf1 (diff) |
tty: return EOF when the 'effective' end of file is reached. ('effective' because ansi/tty files may be concatenated with SAUCE/EFI metadata)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tty.c')
-rw-r--r-- | libavformat/tty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/tty.c b/libavformat/tty.c index b86dd79ca0..a71c6b1939 100644 --- a/libavformat/tty.c +++ b/libavformat/tty.c @@ -128,6 +128,8 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt) if (s->fsize) { // ignore metadata buffer uint64_t p = avio_tell(avctx->pb); + if (p == s->fsize) + return AVERROR_EOF; if (p + s->chars_per_frame > s->fsize) n = s->fsize - p; } |