media: fix seeking

This commit is contained in:
Wim Taymans 2012-11-21 17:21:28 +01:00
parent 5eb5fd45f3
commit 0f93879b2c

View file

@ -293,7 +293,7 @@ collect_media_stats (GstRTSPMedia * media)
if (duration == -1) {
media->range.max.type = GST_RTSP_TIME_END;
media->range.max.seconds = -1;
media->range_start = -1;
media->range_stop = -1;
} else {
media->range.max.type = GST_RTSP_TIME_SECONDS;
media->range.max.seconds = ((gdouble) duration) / GST_SECOND;
@ -849,6 +849,11 @@ gst_rtsp_media_seek (GstRTSPMedia * media, GstRTSPTimeRange * range)
if (!gst_rtsp_range_get_times (range, &start, &stop))
goto not_supported;
GST_INFO ("got %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT,
GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
GST_INFO ("current %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT,
GST_TIME_ARGS (media->range_start), GST_TIME_ARGS (media->range_stop));
if (media->range_start == start)
start = GST_CLOCK_TIME_NONE;
else if (start != GST_CLOCK_TIME_NONE)