[FFmpeg-cvslog] r18902 - trunk/ffplay.c
bcoudurier
subversion
Sat May 23 01:08:08 CEST 2009
Author: bcoudurier
Date: Sat May 23 01:08:07 2009
New Revision: 18902
Log:
fix mouse seeking when start time is not set, fix #1083
Modified:
trunk/ffplay.c
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Sat May 23 00:51:46 2009 (r18901)
+++ trunk/ffplay.c Sat May 23 01:08:07 2009 (r18902)
@@ -2368,6 +2368,7 @@ static void event_loop(void)
break;
case SDL_MOUSEBUTTONDOWN:
if (cur_stream) {
+ int64_t ts;
int ns, hh, mm, ss;
int tns, thh, tmm, tss;
tns = cur_stream->ic->duration/1000000LL;
@@ -2381,7 +2382,10 @@ static void event_loop(void)
ss = (ns%60);
fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100,
hh, mm, ss, thh, tmm, tss);
- stream_seek(cur_stream, (int64_t)(cur_stream->ic->start_time+frac*cur_stream->ic->duration), 0);
+ ts = frac*cur_stream->ic->duration;
+ if (cur_stream->ic->start_time != AV_NOPTS_VALUE)
+ ts += cur_stream->ic->start_time;
+ stream_seek(cur_stream, ts, 0);
}
break;
case SDL_VIDEORESIZE:
More information about the ffmpeg-cvslog
mailing list