From patchwork Mon May 28 20:29:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9142 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp2326661jad; Mon, 28 May 2018 13:30:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKLENF3m6KjBf/NK1cknUx6ttZ7UugNmfeKO/dYAK+cy/5e7a0h+YSIOYffYd3WXUO6Kgr/ X-Received: by 2002:a1c:ea9b:: with SMTP id g27-v6mr5732522wmi.21.1527539437343; Mon, 28 May 2018 13:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527539437; cv=none; d=google.com; s=arc-20160816; b=II7atqMw+HY5YErExJdIfa1Dvfrw6G1A3PSZcHLJ2dTqTL7zTrYqmnEBzxypVaruVK +lcUZ5cISltwmGszB0dBJD8paaX4G1Xr8GSYCqlzUchqg1ZRFkPVx8IPDWKsd/yMEQe/ ZBci+XypK5mTDcsF/NcHm8et0Z2LOrLXk+EZOIfT+SEfX2ZQqFIIiVESdYW80SujA4Xc Gn0XcM6GYvb/Ld6IQ6K8nK/KLqmIebpgCZM3fBY0DxLE+8Et7mwleCCu6MASd2Q1hYKL MB/momEXVH3OonS2i8yw4i+xGfaJggbLsindE+zdtDUO/YPpstB8fI36Ig9oHX3B2WlO dS7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=dDZz8o9q6Ht+bvfr/Jgrd6D/W2Jt6LiXZ/Uf7aQ8jto=; b=YhvMYzu88O3GZOH6Au/b9RbNdCiAydZyPHu04ulFw1g7w7BgcyeD/eaqA4gqOLCQKg 31P+HMMsqpfXmFiYv8CXKiUuCv3QBA4OgZfqBeMZXwkpARxptpY/vsq3lv8KtIHTgJdy CDAMeGEG8okkifklRYN5+gYnxjBeDOZIS6CyX7khzg9GzTAslZGAfNvzR2Fj3qm1t8jH dpKsR9/KD2xIi4iis7Eswc1LakA/UQ0FRV8Rnp8yuM7xs+g8TAMBiv3RxZ4h+wnrePLn Mw+ePml/A0qYx/ixUqq+m4mPLQUYAKV0BuX3ZMOmwT6+fXO/Zo1kLkagp3W7L/30rF18 wuSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w5-v6si1438341wrm.253.2018.05.28.13.30.36; Mon, 28 May 2018 13:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 94F1368A3B5; Mon, 28 May 2018 23:29:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-1.mx.upcmail.net (vie01a-dmta-pe03-1.mx.upcmail.net [62.179.121.160]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 863B1689B4A for ; Mon, 28 May 2018 23:29:35 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fNOmZ-0000sr-1T for ffmpeg-devel@ffmpeg.org; Mon, 28 May 2018 22:30:19 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id rwW81x03i0S5wYM01wW9jl; Mon, 28 May 2018 22:30:09 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 28 May 2018 22:29:58 +0200 Message-Id: <20180528202958.4247-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528202958.4247-1-michael@niedermayer.cc> References: <20180528202958.4247-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/h263dec: Reinitialize idct context if it has not been setup for the active profile X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The profile after reading headers can be different from when the context was initialized Signed-off-by: Michael Niedermayer --- libavcodec/h263dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index c082af1c52..f8a38083f2 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -546,6 +546,8 @@ retry: if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) { if (ff_mpeg4_workaround_bugs(avctx) == 1) goto retry; + if (s->studio_profile != (s->idsp.idct == NULL)) + ff_mpv_idct_init(s); } /* After H.263 & MPEG-4 header decode we have the height, width,