]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tty.c
lavc/pngdec: use a separate bytestream reader for each chunk
[ffmpeg] / libavformat / tty.c
index efa399c108a7a30b768d2656ed68f980c9c577ce..aed5c888c38773144b88e7309a75625e9dc8bd86 100644 (file)
@@ -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;
 }