[FFmpeg-cvslog] swresample: use av_get_default_channel_layout instead of guess_layout
Marton Balint
git at videolan.org
Fri Oct 7 03:14:33 CEST 2011
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Thu Oct 6 23:19:23 2011 +0200| [177ed7e818d1e3cb8159b99965254f1236bff106] | committer: Michael Niedermayer
swresample: use av_get_default_channel_layout instead of guess_layout
Signed-off-by: Marton Balint <cus at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=177ed7e818d1e3cb8159b99965254f1236bff106
---
libswresample/swresample.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index c7b206e..c0a1893 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -22,6 +22,7 @@
#include "swresample_internal.h"
#include "audioconvert.h"
#include "libavutil/avassert.h"
+#include "libavutil/audioconvert.h"
#define C30DB M_SQRT2
#define C15DB 1.189207115
@@ -117,18 +118,6 @@ void swr_free(SwrContext **ss){
av_freep(ss);
}
-static int64_t guess_layout(int ch){
- switch(ch){
- case 1: return AV_CH_LAYOUT_MONO;
- case 2: return AV_CH_LAYOUT_STEREO;
- case 5: return AV_CH_LAYOUT_5POINT0;
- case 6: return AV_CH_LAYOUT_5POINT1;
- case 7: return AV_CH_LAYOUT_7POINT0;
- case 8: return AV_CH_LAYOUT_7POINT1;
- default: return 0;
- }
-}
-
int swr_init(SwrContext *s){
s->in_buffer_index= 0;
s->in_buffer_count= 0;
@@ -183,9 +172,9 @@ int swr_init(SwrContext *s){
}
if(!s-> in_ch_layout)
- s-> in_ch_layout= guess_layout(s->in.ch_count);
+ s-> in_ch_layout= av_get_default_channel_layout(s->in.ch_count);
if(!s->out_ch_layout)
- s->out_ch_layout= guess_layout(s->out.ch_count);
+ s->out_ch_layout= av_get_default_channel_layout(s->out.ch_count);
s->rematrix= s->out_ch_layout !=s->in_ch_layout;
More information about the ffmpeg-cvslog
mailing list