Browse Source

avfilter/avfilter: remove accidental loop index variable reset

Fixes ticket #11442.

Signed-off-by: James Almer <jamrial@gmail.com>
James Almer 9 months ago
parent
commit
db7ff13574
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libavfilter/avfilter.c

+ 2 - 2
libavfilter/avfilter.c

@@ -382,9 +382,9 @@ int ff_filter_config_links(AVFilterContext *filter)
             /* Copy side data before link->srcpad->config_props() is called, so the filter
             /* Copy side data before link->srcpad->config_props() is called, so the filter
              * may remove it for the next filter in the chain */
              * may remove it for the next filter in the chain */
             if (inlink && inlink->nb_side_data && !link->nb_side_data) {
             if (inlink && inlink->nb_side_data && !link->nb_side_data) {
-                for (i = 0; i < inlink->nb_side_data; i++) {
+                for (int j = 0; j < inlink->nb_side_data; j++) {
                     ret = av_frame_side_data_clone(&link->side_data, &link->nb_side_data,
                     ret = av_frame_side_data_clone(&link->side_data, &link->nb_side_data,
-                                                   inlink->side_data[i], 0);
+                                                   inlink->side_data[j], 0);
                     if (ret < 0) {
                     if (ret < 0) {
                         av_frame_side_data_free(&link->side_data, &link->nb_side_data);
                         av_frame_side_data_free(&link->side_data, &link->nb_side_data);
                         return ret;
                         return ret;