mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
qtmux: When accepting renegotiation, just return TRUE and change nothing
We only accept new caps if they are basically the same. We don't want to reset anything as if the caps are new, otherwise various state could get out of sync with the current run.
This commit is contained in:
parent
10f4693163
commit
347e814074
1 changed files with 10 additions and 4 deletions
|
@ -4658,8 +4658,6 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
gint constant_size = 0;
|
gint constant_size = 0;
|
||||||
const gchar *stream_format;
|
const gchar *stream_format;
|
||||||
|
|
||||||
qtpad->prepare_buf_func = NULL;
|
|
||||||
|
|
||||||
/* does not go well to renegotiate stream mid-way, unless
|
/* does not go well to renegotiate stream mid-way, unless
|
||||||
* the old caps are a subset of the new one (this means upstream
|
* the old caps are a subset of the new one (this means upstream
|
||||||
* added more info to the caps, as both should be 'fixed' caps) */
|
* added more info to the caps, as both should be 'fixed' caps) */
|
||||||
|
@ -4677,11 +4675,15 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
||||||
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
||||||
GST_DEBUG_PAD_NAME (pad), caps);
|
GST_DEBUG_PAD_NAME (pad), caps);
|
||||||
|
|
||||||
|
qtpad->prepare_buf_func = NULL;
|
||||||
|
|
||||||
format = qtmux_klass->format;
|
format = qtmux_klass->format;
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
mimetype = gst_structure_get_name (structure);
|
mimetype = gst_structure_get_name (structure);
|
||||||
|
@ -5025,8 +5027,6 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
gboolean sync = FALSE;
|
gboolean sync = FALSE;
|
||||||
int par_num, par_den;
|
int par_num, par_den;
|
||||||
|
|
||||||
qtpad->prepare_buf_func = NULL;
|
|
||||||
|
|
||||||
/* does not go well to renegotiate stream mid-way, unless
|
/* does not go well to renegotiate stream mid-way, unless
|
||||||
* the old caps are a subset of the new one (this means upstream
|
* the old caps are a subset of the new one (this means upstream
|
||||||
* added more info to the caps, as both should be 'fixed' caps) */
|
* added more info to the caps, as both should be 'fixed' caps) */
|
||||||
|
@ -5044,11 +5044,15 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
||||||
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
||||||
GST_DEBUG_PAD_NAME (pad), caps);
|
GST_DEBUG_PAD_NAME (pad), caps);
|
||||||
|
|
||||||
|
qtpad->prepare_buf_func = NULL;
|
||||||
|
|
||||||
format = qtmux_klass->format;
|
format = qtmux_klass->format;
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
mimetype = gst_structure_get_name (structure);
|
mimetype = gst_structure_get_name (structure);
|
||||||
|
@ -5543,6 +5547,8 @@ gst_qt_mux_subtitle_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
|
||||||
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
|
||||||
|
|
Loading…
Reference in a new issue