af_aresample: use extended_data
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 16:46:25 +0000 (18:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 17:23:38 +0000 (19:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_aresample.c

index e33620a..e3a88ff 100644 (file)
@@ -169,8 +169,8 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
     AVFilterLink *const outlink = inlink->dst->outputs[0];
     AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out);
 
-    n_out = swr_convert(aresample->swr, outsamplesref->data, n_out,
-                                 (void *)insamplesref->data, n_in);
+    n_out = swr_convert(aresample->swr, outsamplesref->extended_data, n_out,
+                                 (void *)insamplesref->extended_data, n_in);
     if (n_out <= 0) {
         avfilter_unref_buffer(outsamplesref);
         avfilter_unref_buffer(insamplesref);
@@ -210,7 +210,7 @@ static int request_frame(AVFilterLink *outlink)
         outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out);
         if (!outsamplesref)
             return AVERROR(ENOMEM);
-        n_out = swr_convert(aresample->swr, outsamplesref->data, n_out, 0, 0);
+        n_out = swr_convert(aresample->swr, outsamplesref->extended_data, n_out, 0, 0);
         if (n_out <= 0) {
             avfilter_unref_buffer(outsamplesref);
             return (n_out == 0) ? AVERROR_EOF : n_out;