qtmux: Don't reset request pad numbering across uses

When reset, don't restart request pad numberings, as
request pads can survive across state changes. Only
restart at 0 if all request pads are handed back first.

https://bugzilla.gnome.org/show_bug.cgi?id=777174
This commit is contained in:
Jan Schmidt 2017-01-13 00:01:06 +11:00
parent 191330cba8
commit b0e38ed374

View file

@ -557,8 +557,6 @@ gst_qt_mux_reset (GstQTMux * qtmux, gboolean alloc)
qtmux->moov_pos = 0;
qtmux->mdat_pos = 0;
qtmux->longest_chunk = GST_CLOCK_TIME_NONE;
qtmux->video_pads = 0;
qtmux->audio_pads = 0;
qtmux->fragment_sequence = 0;
if (qtmux->ftyp) {
@ -4735,6 +4733,13 @@ gst_qt_mux_release_pad (GstElement * element, GstPad * pad)
}
gst_collect_pads_remove_pad (mux->collect, pad);
if (mux->sinkpads == NULL) {
/* No more outstanding request pads, reset our counters */
mux->video_pads = 0;
mux->audio_pads = 0;
mux->subtitle_pads = 0;
}
}
static GstPad *