summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
authorVladimir Pantelic <vladoman@gmail.com>2013-09-19 17:50:34 +0200
committerAnton Khirnov <anton@khirnov.net>2013-09-19 19:37:28 +0200
commit5f408333601a827054335f309defcb246a532b21 (patch)
tree838d88943d2f2679f98f2ca5819d64bf2b252415 /libavformat/asfdec.c
parentfdbd924b84e85ac5c80f01ee059ed5c81d3cc205 (diff)
asfdec: substract preroll time from marker presentation time
this was forgotten when we changed ASF to not output the preroll time Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index f3978f08a4..b99cb02c38 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -672,6 +672,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)
static int asf_read_marker(AVFormatContext *s, int64_t size)
{
AVIOContext *pb = s->pb;
+ ASFContext *asf = s->priv_data;
int i, count, name_len, ret;
char name[1024];
@@ -689,6 +690,7 @@ static int asf_read_marker(AVFormatContext *s, int64_t size)
avio_rl64(pb); // offset, 8 bytes
pres_time = avio_rl64(pb); // presentation time
+ pres_time -= asf->hdr.preroll * 10000;
avio_rl16(pb); // entry length
avio_rl32(pb); // send time
avio_rl32(pb); // flags