Browse code

vf_pad: fix mixed code and declarations

Originally committed as revision 23054 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2010/05/08 02:53:29
Showing 1 changed files
... ...
@@ -200,8 +200,9 @@ static AVFilterPicRef *get_video_buffer(AVFilterLink *inlink, int perms, int w,
200 200
     AVFilterPicRef *picref = avfilter_get_video_buffer(inlink->dst->outputs[0], perms,
201 201
                                                        w + (pad->w - pad->in_w),
202 202
                                                        h + (pad->h - pad->in_h));
203
+    int plane;
203 204
 
204
-    for (int plane = 0; plane < 4 && picref->data[plane]; plane++) {
205
+    for (plane = 0; plane < 4 && picref->data[plane]; plane++) {
205 206
         int hsub = (plane == 1 || plane == 2) ? pad->hsub : 0;
206 207
         int vsub = (plane == 1 || plane == 2) ? pad->vsub : 0;
207 208
 
... ...
@@ -216,9 +217,11 @@ static void start_frame(AVFilterLink *inlink, AVFilterPicRef *inpicref)
216 216
 {
217 217
     PadContext *pad = inlink->dst->priv;
218 218
     AVFilterPicRef *outpicref = avfilter_ref_pic(inpicref, ~0);
219
+    int plane;
220
+
219 221
     inlink->dst->outputs[0]->outpic = outpicref;
220 222
 
221
-    for (int plane = 0; plane < 4 && outpicref->data[plane]; plane++) {
223
+    for (plane = 0; plane < 4 && outpicref->data[plane]; plane++) {
222 224
         int hsub = (plane == 1 || plane == 2) ? pad->hsub : 0;
223 225
         int vsub = (plane == 1 || plane == 2) ? pad->vsub : 0;
224 226