Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-08 20:17:31 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-08 23:28:15 +0400
commita260c79733702ebcfb3d14d93cac10ae433ef03a (patch)
tree3be0685df58415ec7d1c8e10a97dcf85e8fe243a /ffmpeg_opt.c
parent9aec63af9b50af1d809d31389d67e98c2c688133 (diff)
ffmpeg: fix dither to 24bit PCM output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 63e3de959f..38ffd420b4 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -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, "dither_method", 0, &ost->swr_dither_method);
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;
if (source_index >= 0) {