mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
imagefreeze: avoid assertion when using accept caps query
This query must receive a fixed caps, so imagefreeze should fixate its framerate before sending the query downstream. https://bugzilla.gnome.org/show_bug.cgi?id=686837
This commit is contained in:
parent
4c6ca8c0fc
commit
115581eb2e
1 changed files with 3 additions and 3 deletions
|
@ -216,9 +216,9 @@ gst_image_freeze_sink_setcaps (GstImageFreeze * self, GstCaps * caps)
|
|||
GstStructure *s = gst_structure_copy (gst_caps_get_structure (caps, i));
|
||||
|
||||
gst_caps_append_structure (candidate, s);
|
||||
if (gst_pad_peer_query_accept_caps (self->srcpad, candidate)) {
|
||||
if (gst_structure_has_field_typed (s, "framerate", GST_TYPE_FRACTION) ||
|
||||
gst_structure_fixate_field_nearest_fraction (s, "framerate", 25, 1)) {
|
||||
if (gst_structure_has_field_typed (s, "framerate", GST_TYPE_FRACTION) ||
|
||||
gst_structure_fixate_field_nearest_fraction (s, "framerate", 25, 1)) {
|
||||
if (gst_pad_peer_query_accept_caps (self->srcpad, candidate)) {
|
||||
gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d);
|
||||
if (fps_d != 0) {
|
||||
g_mutex_lock (&self->lock);
|
||||
|
|
Loading…
Reference in a new issue