]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Move av_class to AVResampleContext instead of ReSampleContext.
authorbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 23 Mar 2009 10:58:05 +0000 (10:58 +0000)
committerbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 23 Mar 2009 10:58:05 +0000 (10:58 +0000)
Fixes issue 852.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18170 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/resample.c
libavcodec/resample2.c

index 829db765708ec351c0e8771021f39f928c53686c..122b725d39b1c28becbccdc5a8c69193aa5c5675 100644 (file)
@@ -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(int output_channels, int input_channels,
     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;
 }
index ac9db73c8ca7b9cebbab097f4d776e442c433160..31d2be7ded984a9f47d7cae21e627c7e1d55329b 100644 (file)
@@ -57,6 +57,7 @@
 
 
 typedef struct AVResampleContext{
+    const AVClass *av_class;
     FELEM *filter_bank;
     int filter_length;
     int ideal_dst_incr;