diff --git a/gst/mpegpsmux/mpegpsmux.c b/gst/mpegpsmux/mpegpsmux.c index a2cb2576fd..f62749634c 100644 --- a/gst/mpegpsmux/mpegpsmux.c +++ b/gst/mpegpsmux/mpegpsmux.c @@ -650,9 +650,9 @@ mpegpsmux_release_pad (GstElement * element, GstPad * pad) gst_buffer_unref (pad_data->codec_data); pad_data->codec_data = NULL; } + if (pad_data->stream_id == mux->video_stream_id) + mux->video_stream_id = 0; } - if (pad_data->stream_id == mux->video_stream_id) - mux->video_stream_id = 0; GST_OBJECT_UNLOCK (pad); gst_collect_pads_remove_pad (mux->collect, pad);