swr: move silence buffer to context to avoid per use malloc/free

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-01-13 15:26:04 +01:00
parent dc6588421e
commit db4e0ecaf0
2 changed files with 9 additions and 9 deletions
+1
View File
@@ -113,6 +113,7 @@ struct SwrContext {
AudioData preout; ///< pre-output audio data: used for rematrix/resample
AudioData out; ///< converted output audio data
AudioData in_buffer; ///< cached audio data (convert and resample purpose)
AudioData silence; ///< temporary with silence
AudioData drop_temp; ///< temporary used to discard output
int in_buffer_index; ///< cached buffer position
int in_buffer_count; ///< cached buffer length