mirror of https://git.ffmpeg.org/ffmpeg.git
ffmpeg: fix dither to 24bit PCM output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9aec63af9b
commit
a260c79733
|
@ -1014,6 +1014,8 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||||
av_opt_get_int (o->g->swr_opts, "filter_type" , 0, &ost->swr_filter_type);
|
av_opt_get_int (o->g->swr_opts, "filter_type" , 0, &ost->swr_filter_type);
|
||||||
av_opt_get_int (o->g->swr_opts, "dither_method", 0, &ost->swr_dither_method);
|
av_opt_get_int (o->g->swr_opts, "dither_method", 0, &ost->swr_dither_method);
|
||||||
av_opt_get_double(o->g->swr_opts, "dither_scale" , 0, &ost->swr_dither_scale);
|
av_opt_get_double(o->g->swr_opts, "dither_scale" , 0, &ost->swr_dither_scale);
|
||||||
|
if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
|
||||||
|
ost->swr_dither_scale = ost->swr_dither_scale*256;
|
||||||
|
|
||||||
ost->source_index = source_index;
|
ost->source_index = source_index;
|
||||||
if (source_index >= 0) {
|
if (source_index >= 0) {
|
||||||
|
|
Loading…
Reference in New Issue