[FFmpeg-cvslog] avformat/tty: add seeking support
Paul B Mahol
git at videolan.org
Mon Feb 10 16:07:52 EET 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb 2 14:03:45 2020 +0100| [767e95d560f9a7ea9d53cbd7f3a9cde9fa35054f] | committer: Paul B Mahol
avformat/tty: add seeking support
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=767e95d560f9a7ea9d53cbd7f3a9cde9fa35054f
---
libavformat/tty.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/tty.c b/libavformat/tty.c
index f889121e26..efa399c108 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -156,6 +156,8 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
pkt->size = av_get_packet(avctx->pb, pkt, n);
if (pkt->size < 0)
return pkt->size;
+ pkt->stream_index = 0;
+ pkt->pts = pkt->pos / n;
pkt->flags |= AV_PKT_FLAG_KEY;
return 0;
}
@@ -185,4 +187,5 @@ AVInputFormat ff_tty_demuxer = {
.read_packet = read_packet,
.extensions = tty_extensions,
.priv_class = &tty_demuxer_class,
+ .flags = AVFMT_GENERIC_INDEX,
};
More information about the ffmpeg-cvslog
mailing list