rtspsrc: only reset the manager object when we did a seek

Only reset the manager object when we used a Range header, ie. when we did a
seek. Otherwise we just paused and we can resume just fine.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677475
This commit is contained in:
Wim Taymans 2012-06-07 12:11:14 +02:00
parent 443a14bdbf
commit eb982e4bbe

View file

@ -3136,7 +3136,8 @@ gst_rtspsrc_activate_streams (GstRTSPSrc * src)
} }
static void static void
gst_rtspsrc_configure_caps (GstRTSPSrc * src, GstSegment * segment) gst_rtspsrc_configure_caps (GstRTSPSrc * src, GstSegment * segment,
gboolean reset_manager)
{ {
GList *walk; GList *walk;
guint64 start, stop; guint64 start, stop;
@ -3172,7 +3173,7 @@ gst_rtspsrc_configure_caps (GstRTSPSrc * src, GstSegment * segment)
} }
GST_DEBUG_OBJECT (src, "stream %p, caps %" GST_PTR_FORMAT, stream, caps); GST_DEBUG_OBJECT (src, "stream %p, caps %" GST_PTR_FORMAT, stream, caps);
} }
if (src->manager) { if (reset_manager && src->manager) {
GST_DEBUG_OBJECT (src, "clear session"); GST_DEBUG_OBJECT (src, "clear session");
g_signal_emit_by_name (src->manager, "clear-pt-map", NULL); g_signal_emit_by_name (src->manager, "clear-pt-map", NULL);
} }
@ -6185,12 +6186,13 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async)
if (control) if (control)
break; break;
} }
/* configure the caps of the streams after we parsed all headers. Only reset
* the manager object when we set a new Range header (we did a seek) */
gst_rtspsrc_configure_caps (src, segment, src->need_range);
/* set again when needed */ /* set again when needed */
src->need_range = FALSE; src->need_range = FALSE;
/* configure the caps of the streams after we parsed all headers. */
gst_rtspsrc_configure_caps (src, segment);
src->running = TRUE; src->running = TRUE;
src->base_time = -1; src->base_time = -1;
src->state = GST_RTSP_STATE_PLAYING; src->state = GST_RTSP_STATE_PLAYING;