mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
flvmux: Fix resetting of the element
Reset the have_video/have_audio flags and make sure to properly release the request pads. Partially fixes bug #590447.
This commit is contained in:
parent
784b95ddbf
commit
cb4eb5714c
1 changed files with 3 additions and 6 deletions
|
@ -183,12 +183,7 @@ gst_flv_mux_reset (GstElement * element)
|
|||
while ((sl = mux->collect->data) != NULL) {
|
||||
GstFlvPad *cpad = (GstFlvPad *) sl->data;
|
||||
|
||||
if (cpad->audio_codec_data)
|
||||
gst_buffer_unref (cpad->audio_codec_data);
|
||||
if (cpad->video_codec_data)
|
||||
gst_buffer_unref (cpad->video_codec_data);
|
||||
|
||||
gst_collect_pads_remove_pad (mux->collect, cpad->collect.pad);
|
||||
gst_element_release_request_pad (element, cpad->collect.pad);
|
||||
}
|
||||
|
||||
if (mux->tags)
|
||||
|
@ -200,6 +195,8 @@ gst_flv_mux_reset (GstElement * element)
|
|||
mux->index = NULL;
|
||||
mux->byte_count = 0;
|
||||
|
||||
mux->have_audio = mux->have_video = FALSE;
|
||||
|
||||
mux->state = GST_FLV_MUX_STATE_HEADER;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue