# HG changeset patch # User benoit # Date 1237805885 0 # Node ID fff66291d84db818a0e467b13a02541f9a5b1af1 # Parent 3fc2f6c6b6849eea570892aebd6c56a78b4a9d09 Move av_class to AVResampleContext instead of ReSampleContext. Fixes issue 852. diff -r 3fc2f6c6b684 -r fff66291d84d resample.c --- 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; } diff -r 3fc2f6c6b684 -r fff66291d84d resample2.c --- 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;