aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-24 19:07:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-24 20:31:56 +0100
commitad899522ffa7f0039e631b0408a36f23aa84c0e7 (patch)
tree6a2890728bf42084705e0100bec473570d1071a7 /ffmpeg_opt.c
parentf3abdf4392a146462dc679846c061b8bf2b5c7a0 (diff)
downloadandroid_external_ffmpeg-ad899522ffa7f0039e631b0408a36f23aa84c0e7.tar.gz
android_external_ffmpeg-ad899522ffa7f0039e631b0408a36f23aa84c0e7.tar.bz2
android_external_ffmpeg-ad899522ffa7f0039e631b0408a36f23aa84c0e7.zip
ffmpeg: use a AVDictionary instead of the context to move swr parameters around
This avoids per parameter changes in ffmpeg at the cost of making access somewhat more annoying. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index c4b886bf0e..b1cd62df8a 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1002,11 +1002,10 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
av_opt_get_int(o->g->sws_opts, "sws_flags", 0, &ost->sws_flags);
- 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);
+
+ av_dict_copy(&ost->swr_opts, o->g->swr_opts, 0);
if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
- ost->swr_dither_scale = ost->swr_dither_scale*256;
+ av_dict_set(&ost->swr_opts, "output_sample_bits", "24", 0);
av_dict_copy(&ost->resample_opts, o->g->resample_opts, 0);