Browse code

lavfi/af_aresample: remove looping on request_frame().

Nicolas George authored on 2015/10/02 22:54:55
Showing 1 changed files
... ...
@@ -40,7 +40,6 @@ typedef struct {
40 40
     double ratio;
41 41
     struct SwrContext *swr;
42 42
     int64_t next_pts;
43
-    int req_fullfilled;
44 43
     int more_data;
45 44
 } AResampleContext;
46 45
 
... ...
@@ -231,7 +230,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref)
231 231
     outsamplesref->nb_samples  = n_out;
232 232
 
233 233
     ret = ff_filter_frame(outlink, outsamplesref);
234
-    aresample->req_fullfilled= 1;
235 234
     av_frame_free(&insamplesref);
236 235
     return ret;
237 236
 }
... ...
@@ -284,10 +282,7 @@ static int request_frame(AVFilterLink *outlink)
284 284
     aresample->more_data = 0;
285 285
 
286 286
     // Second request more data from the input
287
-    aresample->req_fullfilled = 0;
288
-    do{
289
-        ret = ff_request_frame(ctx->inputs[0]);
290
-    }while(!aresample->req_fullfilled && ret>=0);
287
+    ret = ff_request_frame(ctx->inputs[0]);
291 288
 
292 289
     // Third if we hit the end flush
293 290
     if (ret == AVERROR_EOF) {