aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-11-23 00:23:11 +0100
committerMarton Balint <cus@passwd.hu>2012-11-28 21:39:50 +0100
commit2efd01a32f0cc7849794f7a866fddf3991b5f5ce (patch)
tree4c965a2419721cc0774cb02af863efbd04413d76
parentfc38bbcd6ab3cbb137ba64d3ec0c560d63b194cf (diff)
downloadffmpeg-2efd01a32f0cc7849794f7a866fddf3991b5f5ce.tar.gz
ffplay: fix updating external clock after seeking
Now it should work for the timestamp based and the byte based case as well. Also only update the external clock if the seeking was successful. Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--ffplay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index c5ad70fd43..a3bda0eea9 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2669,8 +2669,13 @@ static int read_thread(void *arg)
packet_queue_flush(&is->videoq);
packet_queue_put(&is->videoq, &flush_pkt);
}
+ if (is->seek_flags & AVSEEK_FLAG_BYTE) {
+ //FIXME: use a cleaner way to signal obsolete external clock...
+ update_external_clock_pts(is, (double)AV_NOPTS_VALUE);
+ } else {
+ update_external_clock_pts(is, seek_target / (double)AV_TIME_BASE);
+ }
}
- update_external_clock_pts(is, (seek_target + ic->start_time) / (double)AV_TIME_BASE);
is->seek_req = 0;
eof = 0;
}