2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * gst/flv/gstflvdemux.c: (gst_flv_demux_change_state),
+ (gst_flv_demux_set_index), (gst_flv_demux_init):
+ * gst/flv/gstflvdemux.h:
+ If our index was created by the element and not provided from the
+ outside we should destroy it when starting a new stream to get
+ all old entries removed.
+
+2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* gst/flv/gstflvdemux.c: (gst_flv_demux_pull_range):
Improve debugging a bit when pulling a buffer from upstream fails.
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
+ /* If this is our own index destroy it as the
+ * old entries might be wrong for the new stream */
+ if (demux->own_index) {
+ gst_object_unref (demux->index);
+ demux->index = NULL;
+ demux->own_index = FALSE;
+ }
+
/* If no index was created, generate one */
if (G_UNLIKELY (!demux->index)) {
GST_DEBUG_OBJECT (demux, "no index provided creating our own");
gst_index_get_writer_id (demux->index, GST_OBJECT (demux),
&demux->index_id);
+ demux->own_index = TRUE;
}
gst_flv_demux_cleanup (demux);
break;
GST_OBJECT_UNLOCK (demux);
gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id);
+ demux->own_index = FALSE;
}
static GstIndex *
demux->taglist = gst_tag_list_new ();
gst_segment_init (demux->segment, GST_FORMAT_TIME);
+ demux->own_index = FALSE;
+
gst_flv_demux_cleanup (demux);
}