[FFmpeg-devel] [PATCH 1/2] ffplay: disallow seeking before the start of the file
Marton Balint
cus at passwd.hu
Fri Nov 23 00:28:11 CET 2012
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffplay.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ffplay.c b/ffplay.c
index 5ba5164..c61e4e3 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2984,6 +2984,8 @@ static void event_loop(VideoState *cur_stream)
} else {
pos = get_master_clock(cur_stream);
pos += incr;
+ if (pos < 0)
+ pos = 0;
stream_seek(cur_stream, (int64_t)(pos * AV_TIME_BASE), (int64_t)(incr * AV_TIME_BASE), 0);
}
break;
--
1.7.10.4
More information about the ffmpeg-devel
mailing list