Browse code

lavfi/scale: allocate interlaced scalers only if needed.

Fix "Value 0.000000 for parameter 'srch' out of range"
error message when source or destination height is 1.

Note: since the av_opt_set_int() calls are not checked for
failure and the interlaced scalers are not actually used,
this error has no consequence apart from a frightening message
in the log.

Nicolas George authored on 2013/07/18 18:03:56
Showing 1 changed files
... ...
@@ -287,6 +287,8 @@ static int config_props(AVFilterLink *outlink)
287 287
 
288 288
             if ((ret = sws_init_context(*s, NULL, NULL)) < 0)
289 289
                 return ret;
290
+            if (!scale->interlaced)
291
+                break;
290 292
         }
291 293
     }
292 294