changeset 9252:fff66291d84d libavcodec

Move av_class to AVResampleContext instead of ReSampleContext. Fixes issue 852.
author benoit
date Mon, 23 Mar 2009 10:58:05 +0000
parents 3fc2f6c6b684
children 60a0739a0f0e
files resample.c resample2.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/resample.c	Mon Mar 23 05:13:26 2009 +0000
+++ b/resample.c	Mon Mar 23 10:58:05 2009 +0000
@@ -39,7 +39,6 @@
 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 @@
     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;
 }
--- a/resample2.c	Mon Mar 23 05:13:26 2009 +0000
+++ b/resample2.c	Mon Mar 23 10:58:05 2009 +0000
@@ -57,6 +57,7 @@
 
 
 typedef struct AVResampleContext{
+    const AVClass *av_class;
     FELEM *filter_bank;
     int filter_length;
     int ideal_dst_incr;