mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
qtdemux: Initialize QtDemuxStream.segment in its constructor
This patch moves the initialization of QtDemuxStream.segment from gst_qtdemux_add_stream() to _create_stream(). This ensures the segment is always initialized when the stream is created. Otherwise the segment format is left as GST_FORMAT_UNDEFINED in the case were a track is reparsed and qtdemux_reuse_and_configure_stream() is called instead of gst_qtdemux_add_stream(). (See qtdemux_expose_streams() in the non streams-aware case.)
This commit is contained in:
parent
48a4fd4e50
commit
26cc201c8a
1 changed files with 2 additions and 2 deletions
|
@ -2007,6 +2007,8 @@ _create_stream (GstQTDemux * demux, guint32 track_id)
|
|||
gst_tag_list_set_scope (stream->stream_tags, GST_TAG_SCOPE_STREAM);
|
||||
g_queue_init (&stream->protection_scheme_event_queue);
|
||||
stream->ref_count = 1;
|
||||
/* consistent default for push based mode */
|
||||
gst_segment_init (&stream->segment, GST_FORMAT_TIME);
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
@ -8609,8 +8611,6 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
|||
QtDemuxStream * stream, GstTagList * list)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
/* consistent default for push based mode */
|
||||
gst_segment_init (&stream->segment, GST_FORMAT_TIME);
|
||||
|
||||
if (stream->subtype == FOURCC_vide) {
|
||||
gchar *name = g_strdup_printf ("video_%u", qtdemux->n_video_streams);
|
||||
|
|
Loading…
Reference in a new issue