Commit 7c8f0009 authored by Edward Hervey's avatar Edward Hervey 🤘
Browse files

gst/avi/gstavidemux.*: Don't push tag events found by gst_riff_parse_info() before outputting

Original commit message from CVS:
* gst/avi/gstavidemux.c: (gst_avi_demux_reset),
(gst_avi_demux_stream_header), (push_tag_lists):
* gst/avi/gstavidemux.h:
Don't push tag events found by gst_riff_parse_info() before outputting
GST_EVENT_NEWSEGMENT.
parent f08deb43
2006-07-10 Edward Hervey <edward@fluendo.com>
* gst/avi/gstavidemux.c: (gst_avi_demux_reset),
(gst_avi_demux_stream_header), (push_tag_lists):
* gst/avi/gstavidemux.h:
Don't push tag events found by gst_riff_parse_info() before outputting
GST_EVENT_NEWSEGMENT.
2006-07-10 Wim Taymans <wim@fluendo.com> 2006-07-10 Wim Taymans <wim@fluendo.com>
* gst/rtsp/Makefile.am: * gst/rtsp/Makefile.am:
......
...@@ -232,6 +232,10 @@ gst_avi_demux_reset (GstAviDemux * avi) ...@@ -232,6 +232,10 @@ gst_avi_demux_reset (GstAviDemux * avi)
gst_event_unref (avi->seek_event); gst_event_unref (avi->seek_event);
avi->seek_event = NULL; avi->seek_event = NULL;
if (avi->globaltags)
gst_tag_list_free (avi->globaltags);
avi->globaltags = NULL;
avi->got_tags = FALSE; avi->got_tags = FALSE;
gst_segment_init (&avi->segment, GST_FORMAT_TIME); gst_segment_init (&avi->segment, GST_FORMAT_TIME);
...@@ -2219,13 +2223,8 @@ gst_avi_demux_stream_header (GstAviDemux * avi) ...@@ -2219,13 +2223,8 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
&avi->offset, &tag, &buf)) != GST_FLOW_OK) &avi->offset, &tag, &buf)) != GST_FLOW_OK)
return res; return res;
else { else {
GstTagList *t;
sub = gst_buffer_create_sub (buf, 4, GST_BUFFER_SIZE (buf) - 4); sub = gst_buffer_create_sub (buf, 4, GST_BUFFER_SIZE (buf) - 4);
gst_riff_parse_info (GST_ELEMENT (avi), sub, &t); gst_riff_parse_info (GST_ELEMENT (avi), sub, &avi->globaltags);
if (t) {
gst_element_found_tags (GST_ELEMENT (avi), t);
}
if (sub) { if (sub) {
gst_buffer_unref (sub); gst_buffer_unref (sub);
sub = NULL; sub = NULL;
...@@ -2603,12 +2602,18 @@ push_tag_lists (GstAviDemux * avi) ...@@ -2603,12 +2602,18 @@ push_tag_lists (GstAviDemux * avi)
if (!avi->got_tags) if (!avi->got_tags)
return; return;
GST_DEBUG_OBJECT (avi, "Pushing pending tag lists");
for (i = 0; i < avi->num_streams; i++) for (i = 0; i < avi->num_streams; i++)
if (avi->stream[i].pad && avi->stream[i].taglist) { if (avi->stream[i].pad && avi->stream[i].taglist) {
gst_element_found_tags_for_pad (GST_ELEMENT (avi), avi->stream[i].pad, gst_element_found_tags_for_pad (GST_ELEMENT (avi), avi->stream[i].pad,
avi->stream[i].taglist); avi->stream[i].taglist);
avi->stream[i].taglist = NULL; avi->stream[i].taglist = NULL;
} }
if (avi->globaltags) {
gst_element_found_tags (GST_ELEMENT (avi), avi->globaltags);
avi->globaltags = NULL;
}
avi->got_tags = FALSE; avi->got_tags = FALSE;
} }
......
...@@ -129,6 +129,8 @@ typedef struct _GstAviDemux { ...@@ -129,6 +129,8 @@ typedef struct _GstAviDemux {
GstSegment segment; GstSegment segment;
GstEvent *seek_event; GstEvent *seek_event;
GstTagList *globaltags;
gboolean got_tags; gboolean got_tags;
} GstAviDemux; } GstAviDemux;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment