mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rmdemux: delay announcing container tags until we have pads
Fixes tags when transcoding. https://bugzilla.gnome.org/show_bug.cgi?id=658297
This commit is contained in:
parent
e7425b898c
commit
700d8b1c28
2 changed files with 18 additions and 3 deletions
|
@ -707,6 +707,11 @@ gst_rmdemux_reset (GstRMDemux * rmdemux)
|
|||
rmdemux->n_audio_streams = 0;
|
||||
rmdemux->n_video_streams = 0;
|
||||
|
||||
if (rmdemux->pending_tags != NULL) {
|
||||
gst_tag_list_free (rmdemux->pending_tags);
|
||||
rmdemux->pending_tags = NULL;
|
||||
}
|
||||
|
||||
gst_adapter_clear (rmdemux->adapter);
|
||||
rmdemux->state = RMDEMUX_STATE_HEADER;
|
||||
rmdemux->have_pads = FALSE;
|
||||
|
@ -1861,9 +1866,11 @@ gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const guint8 * data, int length)
|
|||
GstTagList *tags;
|
||||
|
||||
tags = gst_rm_utils_read_tags (data, length, gst_rm_utils_read_string16);
|
||||
if (tags) {
|
||||
gst_element_found_tags (GST_ELEMENT (rmdemux), tags);
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (rmdemux, "tags: %" GST_PTR_FORMAT, tags);
|
||||
|
||||
rmdemux->pending_tags =
|
||||
gst_tag_list_merge (rmdemux->pending_tags, tags, GST_TAG_MERGE_APPEND);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
@ -2604,6 +2611,11 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, GstBuffer * in, guint16 version)
|
|||
|
||||
gst_rmdemux_send_event (rmdemux, event);
|
||||
rmdemux->need_newsegment = FALSE;
|
||||
|
||||
if (rmdemux->pending_tags != NULL) {
|
||||
gst_element_found_tags (GST_ELEMENT (rmdemux), rmdemux->pending_tags);
|
||||
rmdemux->pending_tags = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (stream->pending_tags != NULL) {
|
||||
|
|
|
@ -123,6 +123,9 @@ struct _GstRMDemux {
|
|||
guint32 object_id;
|
||||
guint32 size;
|
||||
guint16 object_version;
|
||||
|
||||
/* container tags for all streams */
|
||||
GstTagList *pending_tags;
|
||||
};
|
||||
|
||||
struct _GstRMDemuxClass {
|
||||
|
|
Loading…
Reference in a new issue