[FFmpeg-soc] [soc]: r4711 - in afilters: af_src.c avfilter.c dummy.c

kdub subversion at mplayerhq.hu
Mon Jul 13 19:43:54 CEST 2009


Author: kdub
Date: Mon Jul 13 19:43:54 2009
New Revision: 4711

Log:
Fix small error causing processing filter to look at wrong place for errors

Modified:
   afilters/af_src.c
   afilters/avfilter.c
   afilters/dummy.c

Modified: afilters/af_src.c
==============================================================================
--- afilters/af_src.c	Mon Jul 13 15:18:34 2009	(r4710)
+++ afilters/af_src.c	Mon Jul 13 19:43:54 2009	(r4711)
@@ -31,7 +31,8 @@ static int av_asrc_buffer_add_samples(AV
             printf("Error! not enough room\n");
             return attempted_load - priv->buf_ref.buffer->n_samples;
         }
-        memcpy(&priv->buf_ref.buffer->data[last] , samples->buffer->data, attempted_load);
+        memcpy(&priv->buf_ref.buffer->data[last] , samples->buffer->data,
+                sizeof(int16_t) * attempted_load);
         priv->last_used  = priv->last_used + attempted_load;
     }
 
@@ -61,7 +62,7 @@ static int dump_next(AVFilterLink *lnk, 
     printf("First Used:\t%i\n",priv->first_used);
     printf("Last Used:\t%i\n", priv->last_used);
 
-    printf("dumping buffer\n");
+   printf("dumping buffer\n");
     return 0;
 
 }

Modified: afilters/avfilter.c
==============================================================================
--- afilters/avfilter.c	Mon Jul 13 15:18:34 2009	(r4710)
+++ afilters/avfilter.c	Mon Jul 13 19:43:54 2009	(r4711)
@@ -269,14 +269,13 @@ void avfilter_filter_buffer(AVFilterLink
         input_func = 0;
     }
 
-    //av_log(0,0,"it is %x\n", filter_buffer);
     link->cur_buf = sample_ref;
 
     if (output_func)
-    filter_output_buffer(link, link->srcbuf);
+    filter_output_buffer(link, link->cur_buf);
 
     if (input_func)
-    filter_input_buffer(link, link->srcbuf);
+    filter_input_buffer(link, link->cur_buf);
 }
 
 

Modified: afilters/dummy.c
==============================================================================
--- afilters/dummy.c	Mon Jul 13 15:18:34 2009	(r4710)
+++ afilters/dummy.c	Mon Jul 13 19:43:54 2009	(r4711)
@@ -67,7 +67,6 @@ int dump_avfiltcont(AVFilterContext *con
 
 int main()
 {
-
     printf("AVfilter version: %x\n", avfilter_version());
 
     /* Simulates a 1024 buffer of sl16 audio data */


More information about the FFmpeg-soc mailing list