Mercurial > libavcodec.hg
comparison resample.c @ 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 | 28b706b75b00 |
| children | ce317c75222d |
comparison
equal
deleted
inserted
replaced
| 9251:3fc2f6c6b684 | 9252:fff66291d84d |
|---|---|
| 37 | 37 |
| 38 static const AVOption options[] = {{NULL}}; | 38 static const AVOption options[] = {{NULL}}; |
| 39 static const AVClass audioresample_context_class = { "ReSampleContext", context_to_name, options }; | 39 static const AVClass audioresample_context_class = { "ReSampleContext", context_to_name, options }; |
| 40 | 40 |
| 41 struct ReSampleContext { | 41 struct ReSampleContext { |
| 42 const AVClass *av_class; | |
| 43 struct AVResampleContext *resample_context; | 42 struct AVResampleContext *resample_context; |
| 44 short *temp[2]; | 43 short *temp[2]; |
| 45 int temp_len; | 44 int temp_len; |
| 46 float ratio; | 45 float ratio; |
| 47 /* channel convert */ | 46 /* channel convert */ |
| 211 | 210 |
| 212 #define TAPS 16 | 211 #define TAPS 16 |
| 213 s->resample_context= av_resample_init(output_rate, input_rate, | 212 s->resample_context= av_resample_init(output_rate, input_rate, |
| 214 filter_length, log2_phase_count, linear, cutoff); | 213 filter_length, log2_phase_count, linear, cutoff); |
| 215 | 214 |
| 216 s->av_class= &audioresample_context_class; | 215 *(AVClass**)s->resample_context = &audioresample_context_class; |
| 217 | 216 |
| 218 return s; | 217 return s; |
| 219 } | 218 } |
| 220 | 219 |
| 221 #if LIBAVCODEC_VERSION_MAJOR < 53 | 220 #if LIBAVCODEC_VERSION_MAJOR < 53 |
