]> git.sesse.net Git - ffmpeg/commitdiff
swr: change minimum I/O channel count to zero.
authorClément Bœsch <ubitux@gmail.com>
Sun, 20 Nov 2011 14:25:01 +0000 (15:25 +0100)
committerClément Bœsch <ubitux@gmail.com>
Sun, 20 Nov 2011 15:06:16 +0000 (16:06 +0100)
This will silence the warning of av_set_opt_int() in swr for
input/output channels when the layout is not yet defined (or supported).

libswresample/swresample.c

index 83b446e3f9fff634b7e3274b704dbd00e699a5f9..1efb563d8f113736094b67d0bf07cd5727162d65 100644 (file)
@@ -36,8 +36,8 @@
 //TODO split options array out?
 #define OFFSET(x) offsetof(SwrContext,x)
 static const AVOption options[]={
-{"ich",  "input channel count", OFFSET( in.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
-{"och", "output channel count", OFFSET(out.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
+{"ich",  "input channel count", OFFSET( in.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 0, SWR_CH_MAX, 0},
+{"och", "output channel count", OFFSET(out.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 0, SWR_CH_MAX, 0},
 {"uch",   "used channel count", OFFSET(used_ch_count  ), AV_OPT_TYPE_INT, {.dbl=0}, 0, SWR_CH_MAX, 0},
 {"isr",  "input sample rate"  , OFFSET( in_sample_rate), AV_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},
 {"osr", "output sample rate"  , OFFSET(out_sample_rate), AV_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},