X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Ftty.c;h=aed5c888c38773144b88e7309a75625e9dc8bd86;hb=8a73313412eeafcfa5afa45f39f65f2581ba3bbc;hp=efa399c108a7a30b768d2656ed68f980c9c577ce;hpb=767e95d560f9a7ea9d53cbd7f3a9cde9fa35054f;p=ffmpeg diff --git a/libavformat/tty.c b/libavformat/tty.c index efa399c108a..aed5c888c38 100644 --- a/libavformat/tty.c +++ b/libavformat/tty.c @@ -65,7 +65,7 @@ static int read_probe(const AVProbeData *p) for (int i = 8; i < p->buf_size; i++) cnt += !!isansicode(p->buf[i]); - return (cnt * 100LL / p->buf_size) * (cnt > 400) * + return (cnt * 99LL / p->buf_size) * (cnt > 400) * !!av_match_ext(p->filename, tty_extensions); } @@ -157,7 +157,7 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt) if (pkt->size < 0) return pkt->size; pkt->stream_index = 0; - pkt->pts = pkt->pos / n; + pkt->pts = pkt->pos / s->chars_per_frame; pkt->flags |= AV_PKT_FLAG_KEY; return 0; }