aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-25 13:25:42 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-26 20:03:57 +0200
commit60497cb984221268ef95d2b63476f4f3379fb7e2 (patch)
tree54c30d8183eaabe7ed701f7ef2ac375333ddd27f /libavformat
parent699c61d2f0b9eb2d8e2da0ebd971b4432e33d140 (diff)
downloadffmpeg-60497cb984221268ef95d2b63476f4f3379fb7e2.tar.gz
Enable generic index/seeking for mgsts demuxer.
This depends on the proposed parser change for 0-size packets in previous mail, otherwise video now plays far too fast. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mgsts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mgsts.c b/libavformat/mgsts.c
index 3377d07431..dec6bfc8f6 100644
--- a/libavformat/mgsts.c
+++ b/libavformat/mgsts.c
@@ -50,6 +50,7 @@ static int read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
+ st->need_parsing = AVSTREAM_PARSE_HEADERS;
st->start_time = 0;
st->nb_frames =
st->duration = avio_rb32(pb);
@@ -88,6 +89,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0)
return ret;
+ pkt->pos -= 16;
pkt->duration = 1;
avio_skip(pb, chunk_size - (ret + 16));
@@ -100,4 +102,5 @@ AVInputFormat ff_mgsts_demuxer = {
.read_probe = read_probe,
.read_header = read_header,
.read_packet = read_packet,
+ .flags = AVFMT_GENERIC_INDEX,
};