You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
688cb71252
commit
bf959ac2c6
@@ -128,6 +128,8 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
|
|||||||
if (s->fsize) {
|
if (s->fsize) {
|
||||||
// ignore metadata buffer
|
// ignore metadata buffer
|
||||||
uint64_t p = avio_tell(avctx->pb);
|
uint64_t p = avio_tell(avctx->pb);
|
||||||
|
if (p == s->fsize)
|
||||||
|
return AVERROR_EOF;
|
||||||
if (p + s->chars_per_frame > s->fsize)
|
if (p + s->chars_per_frame > s->fsize)
|
||||||
n = s->fsize - p;
|
n = s->fsize - p;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user