From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 8313F4BE82 for ; Tue, 4 Feb 2025 11:15:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DDAD168B672; Tue, 4 Feb 2025 13:15:43 +0200 (EET) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BD8268B510 for ; Tue, 4 Feb 2025 13:15:37 +0200 (EET) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-46c8474d8daso38975751cf.3 for ; Tue, 04 Feb 2025 03:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738667736; x=1739272536; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1d89zKkVaaVW1cmVNxDn3BRM5SrorYVLe/0kI09feG4=; b=C+dYNFCidGNGSw5th1cTeWSph5ctSlOP/GcemZnijP8nGoeE5COBC3EaoFaCDpBya5 Nrmx4sxRYXTlnXAS8K4Fuc+GcDv9kuFZH9Q9p+yaYktKgSomFJNkQfs3z1sunYaFl9lg IzdcGX/v+5067jxb1QlhBLcSw9KW3QPS7NgtRBWPMQV/ghD3yv2cauMkIklB2nJDyIMg PaCMqk3d55YdMe+82Eix+Ma82UNDbMTMueShBZPPl7XQADvm+ev6TdpGZYS+3bi6VEPH 6lyhnEXFcGGtsIydGDBgpM/o16EZxRuIBwScs8ucBy3AMOx0EedmOE6DSj28rZ6hB5Fz PK3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738667736; x=1739272536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1d89zKkVaaVW1cmVNxDn3BRM5SrorYVLe/0kI09feG4=; b=pQiw9RUeY72A6VjmjHHOe1V1vnd+YFU0ptkOzbShufNgCr3Y8Ebc4xn3wB+8EWABQl kPIr+/V2Z0enmntntEyndS7IyQ/Cotq4JixvhpqEh0cNnkX4/pgzUYcUMYODivFpFOks 6pMv4J8I60euwuvOoauG5qZOd6UEfDxHslRYwZdJAvAlqF9VSEBiBguVMMYN1oSnEMeF PLceUBpdOF8DFXktVRlnEpAFuOeneo7WXu5ufzRCU7pouIyG/sd5oZRi1BxT+uznYwQv GYYnaHdbXvBxrG5PjZouQq9oAT4w4vttKlwpLUbGPJHU6RzCbndMmScHqKISp4K6kVw5 q/2A== X-Gm-Message-State: AOJu0Yw1SgSu1GPRrJROrvrQBPt6RDBIJodFFlKNyCnNBZ2brHIndqOD vXllzNxbNKNTKQFi9qBeKiRv0hkLwyiI1DyE+tzaR2UWcyEXvRSgfTcX1YXAJ4Hqiw== X-Gm-Gg: ASbGncvDZuz6iLRHxVIRf7jvf6l+MH+PmOeMKIEkNiDDlLccwD3dovNTWqFp8fRtk9W +xyPdElYRCFlvLLnMsvYrZaUIdSPwfHYS1Ll0TcrEXhrfGOfYMTDIglr1gWzcRb94cmIYXfxe/Z pgM7YH13oBBKcMN4MGvfeUnhbV+WGmQ5yNMSzy446dia6yA93tyIJCkp5F6h413qEIUvYicONLz KBccLX5D7FISOokiapcNC8YDqhx1A7VyjNUKrHVV96gWGJlSm4fIzW048c4iWtH405zyoB1Mc1N fqAxSudXVikYk6yy0E3iVxN5iqY5OwqYO3/FU2ZpmEI48Q== X-Google-Smtp-Source: AGHT+IEDlMbj0nBMHXCuKYviNZZA6L4Kl0F577OwSc9hIKTtM73TlxNrEirYSSqOylOvwiBjseKxdw== X-Received: by 2002:a05:622a:1496:b0:467:5eb6:5153 with SMTP id d75a77b69052e-46fd0aa2a43mr365971261cf.19.1738667735647; Tue, 04 Feb 2025 03:15:35 -0800 (PST) Received: from localhost.localdomain ([12.172.251.101]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46fdf17c92fsm58181831cf.67.2025.02.04.03.15.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Feb 2025 03:15:34 -0800 (PST) From: Romain Beauxis To: ffmpeg-devel@ffmpeg.org Date: Tue, 4 Feb 2025 06:15:19 -0500 Message-Id: <20250204111521.48785-2-romain.beauxis@gmail.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250204111521.48785-1-romain.beauxis@gmail.com> References: <20250204111521.48785-1-romain.beauxis@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/3] libavformat/oggdec: Allow first parameter in ff_vorbis_comment to be a generic AVClass struct 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: epirat07@gmail.com, Romain Beauxis Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Firt argument in these function is only used to pass to av_log. This makes it possible to re-use them with any type of AVClass struct. --- libavformat/oggdec.h | 5 ++++- libavformat/oggparsevorbis.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h index 43df23f4cb..6177254fd2 100644 --- a/libavformat/oggdec.h +++ b/libavformat/oggdec.h @@ -136,8 +136,11 @@ extern const struct ogg_codec ff_vp8_codec; * so it needs to be writable. Furthermore it must be padded * by a single byte (not counted in size). * All changes will have been reverted upon return. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. */ -int ff_vorbis_comment(AVFormatContext *ms, AVDictionary **m, +int ff_vorbis_comment(void *avcl, AVDictionary **m, const uint8_t *buf, int size, int parse_picture); /** diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 9f50ab9ffc..62eb8bbf70 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -88,7 +88,7 @@ int ff_vorbis_stream_comment(AVFormatContext *as, AVStream *st, * and reverts its changes before return. The input buffer needs to have * at least one byte of padding. */ -static int vorbis_parse_single_comment(AVFormatContext *as, AVDictionary **m, +static int vorbis_parse_single_comment(void *as, AVDictionary **m, const uint8_t *buf, uint32_t size, int *updates, int parse_picture) { @@ -146,7 +146,7 @@ end: return 0; } -int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, +int ff_vorbis_comment(void *as, AVDictionary **m, const uint8_t *buf, int size, int parse_picture) { -- 2.39.5 (Apple Git-154) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".