lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format

Also make this the default value.
This commit is contained in:
Justin Ruggles
2012-06-01 15:19:45 -04:00
parent db0e7bd0bd
commit 8ca08066fc
4 changed files with 17 additions and 20 deletions

View File

@@ -102,12 +102,6 @@ static int config_output(AVFilterLink *outlink)
av_opt_set_int(s->avr, "in_sample_rate", inlink ->sample_rate, 0);
av_opt_set_int(s->avr, "out_sample_rate", outlink->sample_rate, 0);
/* if both the input and output formats are s16 or u8, use s16 as
the internal sample format */
if (av_get_bytes_per_sample(inlink->format) <= 2 &&
av_get_bytes_per_sample(outlink->format) <= 2)
av_opt_set_int(s->avr, "internal_sample_fmt", AV_SAMPLE_FMT_S16P, 0);
if ((ret = avresample_open(s->avr)) < 0)
return ret;