mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
matroskamux: Remove suspicious checks for pads being active and linked
We should add all pads, no matter if they are linked or active or not at this point. Skipping some that are not will cause different behaviour than with other muxers.
This commit is contained in:
parent
dbb8ec4639
commit
f0ba7a5ca4
1 changed files with 12 additions and 13 deletions
|
@ -2875,22 +2875,21 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
|
||||||
for (collected = mux->collect->data; collected;
|
for (collected = mux->collect->data; collected;
|
||||||
collected = g_slist_next (collected)) {
|
collected = g_slist_next (collected)) {
|
||||||
GstMatroskaPad *collect_pad;
|
GstMatroskaPad *collect_pad;
|
||||||
GstPad *thepad;
|
|
||||||
|
|
||||||
collect_pad = (GstMatroskaPad *) collected->data;
|
collect_pad = (GstMatroskaPad *) collected->data;
|
||||||
thepad = collect_pad->collect.pad;
|
|
||||||
|
|
||||||
if (gst_pad_is_linked (thepad) && gst_pad_is_active (thepad) &&
|
/* This will cause an error at a later time */
|
||||||
collect_pad->track->codec_id != NULL) {
|
if (collect_pad->track->codec_id == NULL)
|
||||||
collect_pad->track->num = tracknum++;
|
continue;
|
||||||
child = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKENTRY);
|
|
||||||
gst_matroska_mux_track_header (mux, collect_pad->track);
|
collect_pad->track->num = tracknum++;
|
||||||
gst_ebml_write_master_finish (ebml, child);
|
child = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKENTRY);
|
||||||
/* some remaining pad/track setup */
|
gst_matroska_mux_track_header (mux, collect_pad->track);
|
||||||
collect_pad->default_duration_scaled =
|
gst_ebml_write_master_finish (ebml, child);
|
||||||
gst_util_uint64_scale (collect_pad->track->default_duration,
|
/* some remaining pad/track setup */
|
||||||
1, mux->time_scale);
|
collect_pad->default_duration_scaled =
|
||||||
}
|
gst_util_uint64_scale (collect_pad->track->default_duration,
|
||||||
|
1, mux->time_scale);
|
||||||
}
|
}
|
||||||
gst_ebml_write_master_finish (ebml, master);
|
gst_ebml_write_master_finish (ebml, master);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue