diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-11-24 04:30:32 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2011-11-24 16:55:45 +0100 |
commit | 58205edcc67f606f13f2bc4571e5f5bd61eaef05 (patch) | |
tree | 9e3f55febeb55902b8abb3cfc9951f4752207792 /libswresample/swresample.c | |
parent | 573ffbb3b563d8ab9e4363acfad62d1a688f05c1 (diff) | |
download | ffmpeg-58205edcc67f606f13f2bc4571e5f5bd61eaef05.tar.gz |
swr: use native planar sample formats.
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index e4c1ff9ca2..831bae005c 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -143,10 +143,10 @@ int swr_init(struct SwrContext *s){ swri_audio_convert_free(&s->out_convert); swri_audio_convert_free(&s->full_convert); - s-> in.planar= s-> in_sample_fmt >= 0x100; - s->out.planar= s->out_sample_fmt >= 0x100; - s-> in_sample_fmt &= 0xFF; - s->out_sample_fmt &= 0xFF; + s-> in.planar= av_sample_fmt_is_planar(s-> in_sample_fmt); + s->out.planar= av_sample_fmt_is_planar(s->out_sample_fmt); + s-> in_sample_fmt= av_get_alt_sample_fmt(s-> in_sample_fmt, 0); + s->out_sample_fmt= av_get_alt_sample_fmt(s->out_sample_fmt, 0); if(s-> in_sample_fmt >= AV_SAMPLE_FMT_NB){ av_log(s, AV_LOG_ERROR, "Requested sample format %s is invalid\n", av_get_sample_fmt_name(s->in_sample_fmt)); |