[FFmpeg-cvslog] r18170 - in trunk/libavcodec: resample.c resample2.c

benoit subversion
Mon Mar 23 11:58:06 CET 2009


Author: benoit
Date: Mon Mar 23 11:58:05 2009
New Revision: 18170

Log:
Move av_class to AVResampleContext instead of ReSampleContext.
Fixes issue 852.

Modified:
   trunk/libavcodec/resample.c
   trunk/libavcodec/resample2.c

Modified: trunk/libavcodec/resample.c
==============================================================================
--- trunk/libavcodec/resample.c	Mon Mar 23 06:13:26 2009	(r18169)
+++ trunk/libavcodec/resample.c	Mon Mar 23 11:58:05 2009	(r18170)
@@ -39,7 +39,6 @@ static const AVOption options[] = {{NULL
 static const AVClass audioresample_context_class = { "ReSampleContext", context_to_name, options };
 
 struct ReSampleContext {
-    const AVClass *av_class;
     struct AVResampleContext *resample_context;
     short *temp[2];
     int temp_len;
@@ -213,7 +212,7 @@ ReSampleContext *av_audio_resample_init(
     s->resample_context= av_resample_init(output_rate, input_rate,
                          filter_length, log2_phase_count, linear, cutoff);
 
-    s->av_class= &audioresample_context_class;
+    *(AVClass**)s->resample_context = &audioresample_context_class;
 
     return s;
 }

Modified: trunk/libavcodec/resample2.c
==============================================================================
--- trunk/libavcodec/resample2.c	Mon Mar 23 06:13:26 2009	(r18169)
+++ trunk/libavcodec/resample2.c	Mon Mar 23 11:58:05 2009	(r18170)
@@ -57,6 +57,7 @@
 
 
 typedef struct AVResampleContext{
+    const AVClass *av_class;
     FELEM *filter_bank;
     int filter_length;
     int ideal_dst_incr;



More information about the ffmpeg-cvslog mailing list