mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
Avoid C99 declaration in 'for' loop
This commit is contained in:
parent
6310145a44
commit
ad24cb1b77
1 changed files with 4 additions and 2 deletions
|
@ -97,6 +97,7 @@ gst_mockdecryptor_transform_caps (GstBaseTransform * base,
|
||||||
GstCaps *transformed_caps = NULL;
|
GstCaps *transformed_caps = NULL;
|
||||||
guint incoming_caps_size, size;
|
guint incoming_caps_size, size;
|
||||||
gint duplicate;
|
gint duplicate;
|
||||||
|
guint i;
|
||||||
|
|
||||||
if (direction == GST_PAD_UNKNOWN)
|
if (direction == GST_PAD_UNKNOWN)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -108,9 +109,10 @@ gst_mockdecryptor_transform_caps (GstBaseTransform * base,
|
||||||
transformed_caps = gst_caps_new_empty ();
|
transformed_caps = gst_caps_new_empty ();
|
||||||
|
|
||||||
incoming_caps_size = gst_caps_get_size (caps);
|
incoming_caps_size = gst_caps_get_size (caps);
|
||||||
for (guint i = 0; i < incoming_caps_size; ++i) {
|
for (i = 0; i < incoming_caps_size; ++i) {
|
||||||
GstStructure *incoming_structure = gst_caps_get_structure (caps, i);
|
GstStructure *incoming_structure = gst_caps_get_structure (caps, i);
|
||||||
GstStructure *outgoing_structure = NULL;
|
GstStructure *outgoing_structure = NULL;
|
||||||
|
guint index;
|
||||||
|
|
||||||
if (direction == GST_PAD_SINK) {
|
if (direction == GST_PAD_SINK) {
|
||||||
if (!gst_structure_has_field (incoming_structure, "original-media-type"))
|
if (!gst_structure_has_field (incoming_structure, "original-media-type"))
|
||||||
|
@ -145,7 +147,7 @@ gst_mockdecryptor_transform_caps (GstBaseTransform * base,
|
||||||
duplicate = FALSE;
|
duplicate = FALSE;
|
||||||
size = gst_caps_get_size (transformed_caps);
|
size = gst_caps_get_size (transformed_caps);
|
||||||
|
|
||||||
for (guint index = 0; !duplicate && index < size; ++index) {
|
for (index = 0; !duplicate && index < size; ++index) {
|
||||||
GstStructure *structure =
|
GstStructure *structure =
|
||||||
gst_caps_get_structure (transformed_caps, index);
|
gst_caps_get_structure (transformed_caps, index);
|
||||||
if (gst_structure_is_equal (structure, outgoing_structure))
|
if (gst_structure_is_equal (structure, outgoing_structure))
|
||||||
|
|
Loading…
Reference in a new issue