From patchwork Tue Jan 24 00:13:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 40092 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3ca3:b0:b9:1511:ac2c with SMTP id b35csp3586249pzj; Mon, 23 Jan 2023 16:13:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZ5dPL3xXvYnob260hmzCjEEj6Y64P1JdA/uGxXAarslm8v+FbcdpX15t7p8AqVOA0BvMD X-Received: by 2002:a17:906:d787:b0:872:5c0a:5597 with SMTP id pj7-20020a170906d78700b008725c0a5597mr25932911ejb.70.1674519227391; Mon, 23 Jan 2023 16:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674519227; cv=none; d=google.com; s=arc-20160816; b=kdwJEwo6gW3EW2QpNf8LrDWSbgFF3hWYQRCAo2idIMwSd9RGBy0E8T4CcACz9+vjP9 3Fg43QY5JAp7KdFLJGA/0zGCICvxX5F6kiOOLwsypRIukoQlb8TpojPkKd5wZRcjFK0y CO9PzFhYOaamFRN9tZF80ZAZtvYcsYJhqwx8xkQnf4GjtOn2JL6wt/6mEpvY35w55dfe GI43qYVZsL5/bXd7eK7YE2Vzn8UX5ocY0Rhj/gD6fb+7VTiXV21C+crc+mf2J1FinS3j 6NigWorzZTCuhAhgipGUT7inRl+oBw7fDxlHK2wKUPYGaBViXvItkSlw20zKpPIR5J0X e54g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=bLUaFiqo8hdMOUatGzFIOn8jo6EfMg9UVNt6O9/0xnw=; b=JnjMsaqIdDhY7WLRJtJu0NdlqtEwXIZFfnZF1ifayVp0GuBYE5n0jwRpe+UhnBQHb4 6KUTV/+r4z1ZXBcBKFZ7+FQHgoecskngKVfJ5xs+5BWSF4l3Gy2nnhL8GZGP7KB+Uo38 42nRwzAPHzv2X047ZonRGC3ReBsF7aWt/CHmplWF2IFHE3ozEcCvic4WQcqsWEDXt2bz /MaK1+reEtAH24XVauT9unRnzzAbjR+fk9he7kLE+U6w9Ddvpuw9p0P52wY6xQuu6o9F 4uxp/rIDwJ2NECShrQ/TGhJunuvmgYumRTs6j3HoeqI/dgZVnBEDNEkN/oyAhY7n8kmu B4kA== 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 v20-20020a17090610d400b007c16107b16bsi378473ejv.432.2023.01.23.16.13.46; Mon, 23 Jan 2023 16:13:47 -0800 (PST) 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 0D34768BDE7; Tue, 24 Jan 2023 02:13:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E9E668BDDD for ; Tue, 24 Jan 2023 02:13:37 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 281ABE8633; Tue, 24 Jan 2023 01:13:36 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9c_c3ap2GH8k; Tue, 24 Jan 2023 01:13:29 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 5EB01E8630; Tue, 24 Jan 2023 01:13:29 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Jan 2023 01:13:18 +0100 Message-Id: <20230124001322.23263-1-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg4videoenc: use MpegEncContext->picture_number instead of encode function parameter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: wTY3Yjzu0hTE They should be the same and that is what most encode functions use. Signed-off-by: Marton Balint --- libavcodec/mpeg4videoenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index a2a14afbd0..e327334d59 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1065,7 +1065,7 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number) if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) { if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy mpeg4_encode_visual_object_header(s); - if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy + if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || s->picture_number == 0) // HACK, the reference sw is buggy mpeg4_encode_vol_header(s, 0, 0); } if (!(s->workaround_bugs & FF_BUG_MS))