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.
This commit is contained in:
Edward Hervey 2006-07-10 20:11:34 +00:00
parent f08deb4345
commit 7c8f0009cc
3 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,11 @@
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>
* gst/rtsp/Makefile.am:

View file

@ -232,6 +232,10 @@ gst_avi_demux_reset (GstAviDemux * avi)
gst_event_unref (avi->seek_event);
avi->seek_event = NULL;
if (avi->globaltags)
gst_tag_list_free (avi->globaltags);
avi->globaltags = NULL;
avi->got_tags = FALSE;
gst_segment_init (&avi->segment, GST_FORMAT_TIME);
@ -2219,13 +2223,8 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
&avi->offset, &tag, &buf)) != GST_FLOW_OK)
return res;
else {
GstTagList *t;
sub = gst_buffer_create_sub (buf, 4, GST_BUFFER_SIZE (buf) - 4);
gst_riff_parse_info (GST_ELEMENT (avi), sub, &t);
if (t) {
gst_element_found_tags (GST_ELEMENT (avi), t);
}
gst_riff_parse_info (GST_ELEMENT (avi), sub, &avi->globaltags);
if (sub) {
gst_buffer_unref (sub);
sub = NULL;
@ -2603,12 +2602,18 @@ push_tag_lists (GstAviDemux * avi)
if (!avi->got_tags)
return;
GST_DEBUG_OBJECT (avi, "Pushing pending tag lists");
for (i = 0; i < avi->num_streams; i++)
if (avi->stream[i].pad && avi->stream[i].taglist) {
gst_element_found_tags_for_pad (GST_ELEMENT (avi), avi->stream[i].pad,
avi->stream[i].taglist);
avi->stream[i].taglist = NULL;
}
if (avi->globaltags) {
gst_element_found_tags (GST_ELEMENT (avi), avi->globaltags);
avi->globaltags = NULL;
}
avi->got_tags = FALSE;
}

View file

@ -129,6 +129,8 @@ typedef struct _GstAviDemux {
GstSegment segment;
GstEvent *seek_event;
GstTagList *globaltags;
gboolean got_tags;
} GstAviDemux;