diff mbox

[FFmpeg-devel,3/3] lavc/libdavs2: fix parameter setting error

Message ID 1548139091-3894-3-git-send-email-hwrenx@126.com
State Superseded
Headers show

Commit Message

hwren Jan. 22, 2019, 6:38 a.m. UTC
Signed-off-by: hwrenx <hwrenx@126.com>
---
 libavcodec/libdavs2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Liu Steven Jan. 22, 2019, 8:05 a.m. UTC | #1
> 在 2019年1月22日,下午2:38,hwrenx <hwrenx@126.com> 写道:
> 
> Signed-off-by: hwrenx <hwrenx@126.com>
> ---
> libavcodec/libdavs2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
> index cf75656..f8f1b05 100644
> --- a/libavcodec/libdavs2.c
> +++ b/libavcodec/libdavs2.c
> @@ -45,10 +45,11 @@ static av_cold int davs2_init(AVCodecContext *avctx)
>    /* init the decoder */
>    cad->param.threads      = avctx->thread_count;
>    cad->param.info_level   = 0;
> -    cad->decoder            = davs2_decoder_open(&cad->param);
>    cad->param.disable_avx  = !(cpu_flags & AV_CPU_FLAG_AVX &&
>                                cpu_flags & AV_CPU_FLAG_AVX2);
> 
> +    cad->decoder            = davs2_decoder_open(&cad->param);
> +
empty line
>    if (!cad->decoder) {
>        av_log(avctx, AV_LOG_ERROR, "decoder created error.");
>        return AVERROR_EXTERNAL;
> -- 
> 2.7.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
index cf75656..f8f1b05 100644
--- a/libavcodec/libdavs2.c
+++ b/libavcodec/libdavs2.c
@@ -45,10 +45,11 @@  static av_cold int davs2_init(AVCodecContext *avctx)
     /* init the decoder */
     cad->param.threads      = avctx->thread_count;
     cad->param.info_level   = 0;
-    cad->decoder            = davs2_decoder_open(&cad->param);
     cad->param.disable_avx  = !(cpu_flags & AV_CPU_FLAG_AVX &&
                                 cpu_flags & AV_CPU_FLAG_AVX2);
 
+    cad->decoder            = davs2_decoder_open(&cad->param);
+
     if (!cad->decoder) {
         av_log(avctx, AV_LOG_ERROR, "decoder created error.");
         return AVERROR_EXTERNAL;