diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-28 00:03:38 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 15:10:07 +0200 |
commit | e4f9a5efa15aa49d6c8cd742d80595ed668d58cb (patch) | |
tree | c72fe504473a9310b8b60fe771ec5f5032b9abea | |
parent | 61e5001b265b40909ebab4723688d1074a76e37f (diff) | |
download | ffmpeg-e4f9a5efa15aa49d6c8cd742d80595ed668d58cb.tar.gz |
avcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx & defaults
fixes x264opts opengop=1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 64b79141bdfdffaa9fda69eecce140473d0a9a18)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libx264.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 89df55fac6..39338d3f38 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -355,19 +355,6 @@ static av_cold int X264_init(AVCodecContext *avctx) OPT_STR("level", x4->level); - if(x4->x264opts){ - const char *p= x4->x264opts; - while(p){ - char param[256]={0}, val[256]={0}; - if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){ - OPT_STR(param, "1"); - }else - OPT_STR(param, val); - p= strchr(p, ':'); - p+=!!p; - } - } - if (avctx->i_quant_factor > 0) x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); @@ -543,6 +530,19 @@ static av_cold int X264_init(AVCodecContext *avctx) if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) x4->params.b_repeat_headers = 0; + if(x4->x264opts){ + const char *p= x4->x264opts; + while(p){ + char param[256]={0}, val[256]={0}; + if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){ + OPT_STR(param, "1"); + }else + OPT_STR(param, val); + p= strchr(p, ':'); + p+=!!p; + } + } + if (x4->x264_params) { AVDictionary *dict = NULL; AVDictionaryEntry *en = NULL; |