summaryrefslogtreecommitdiff
path: root/gst/matroska/matroska-mux.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-07-07 18:24:59 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-07-07 18:26:48 +0300
commitf0ba7a5ca49840d07aebc539a3153894c4d66c3c (patch)
tree3848e676ceaecb812cd41fd941ae866981286e64 /gst/matroska/matroska-mux.c
parentdbb8ec4639f225c57384a876749c27a59f21baf1 (diff)
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.
Diffstat (limited to 'gst/matroska/matroska-mux.c')
-rw-r--r--gst/matroska/matroska-mux.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 1f5142871..4922496f8 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -2875,22 +2875,21 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
for (collected = mux->collect->data; collected;
collected = g_slist_next (collected)) {
GstMatroskaPad *collect_pad;
- GstPad *thepad;
collect_pad = (GstMatroskaPad *) collected->data;
- thepad = collect_pad->collect.pad;
- if (gst_pad_is_linked (thepad) && gst_pad_is_active (thepad) &&
- collect_pad->track->codec_id != NULL) {
- collect_pad->track->num = tracknum++;
- child = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKENTRY);
- gst_matroska_mux_track_header (mux, collect_pad->track);
- gst_ebml_write_master_finish (ebml, child);
- /* some remaining pad/track setup */
- collect_pad->default_duration_scaled =
- gst_util_uint64_scale (collect_pad->track->default_duration,
- 1, mux->time_scale);
- }
+ /* This will cause an error at a later time */
+ if (collect_pad->track->codec_id == NULL)
+ continue;
+
+ collect_pad->track->num = tracknum++;
+ child = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKENTRY);
+ gst_matroska_mux_track_header (mux, collect_pad->track);
+ gst_ebml_write_master_finish (ebml, child);
+ /* some remaining pad/track setup */
+ 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);