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 ESMTP id 0B3AE46A95 for ; Fri, 1 Sep 2023 23:15:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0602B68C7A2; Sat, 2 Sep 2023 02:15:00 +0300 (EEST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 073CB68C67A for ; Sat, 2 Sep 2023 02:14:52 +0300 (EEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-307d58b3efbso2055930f8f.0 for ; Fri, 01 Sep 2023 16:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693610090; x=1694214890; 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=Leko/GgALxTRPJDktzFRUAOo9LW2qX6OFvk8VjAT9xw=; b=AvTAOGW6ATplyWRqhXrlw9VODMZr4PUDufqCpRcQ6hIfZ7UO3GOQTtbsw96U3cANW9 Af8MUf6I8oYlAKZdbeuJLwPhWURKI7vAdYIEFUvgrV3UVDrwZUQHtngIJDTVxwjihmc5 BOmtkmXbMXBkANgalB8BCr4MfyeOLBvimswf7sRgmAutM51WJxN+MYgtFe9UVcF2/Eej yId3PRHpd1nWIJPwVcr6pxR9uAkg5gNybnj4TWxens0g/OX0s26WXV1DLvDmJnPPKKOy 5uxE/e8kGEiCqXaNvHArgwJqFf7duI3R+eh03bibO08OVwx0sH41ILhja4JmB2nzEDEd vZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693610090; x=1694214890; 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=Leko/GgALxTRPJDktzFRUAOo9LW2qX6OFvk8VjAT9xw=; b=CPOZiEiQhCxNNZKWLCagvbaLU2Mz0FYAnMx4+rgJwb1yYrsm+WBtdAWsqqUyiiu0tG ghi40IC/DwdnPIN1E0MMFXULyvbkXbdjd7i1ijZMhpbyu0GxQUyQVfPCknJrcXWdhZ58 MSXtjau2dI3IL0iEBh2LEP+BJ1/C/Fh3b+wqkFqolIDX2DrbdsfOycq77TgYRaf4cis8 7GxHMZMi9eN74loCqix4sw2ZGjXekidebSGTBeP9wfWk6xUY5b4Eh9yguaq6X4DR4oce 7hzbwLLAjlCqaN9kMr2eqrMp1iMAkOou5hh/mUob1EFT7h0Pph6VCEmjdmJShM6iAaNe EveQ== X-Gm-Message-State: AOJu0Yzb4bisuGgfUweYLyfmp+X/VkbMQATU1VylzpTxEJYwBoLjl8CE 8WWO3lF9IJKvIHFWZZBYBW5BoeZvO1Q= X-Google-Smtp-Source: AGHT+IFp85Qq6oZCAZddymzwduOym4yeSJYhIfV/3e4g0CH9bNo9tkCM4UJd/2tHNLgBEvqQUPPHYQ== X-Received: by 2002:a5d:6690:0:b0:317:3deb:a899 with SMTP id l16-20020a5d6690000000b003173deba899mr2845534wru.1.1693610090128; Fri, 01 Sep 2023 16:14:50 -0700 (PDT) Received: from mariano ([82.84.194.139]) by smtp.gmail.com with ESMTPSA id f3-20020a5d6643000000b00318147fd2d3sm6499716wrw.41.2023.09.01.16.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Sep 2023 16:14:48 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 71CC2BFCE0; Sat, 2 Sep 2023 01:14:47 +0200 (CEST) From: Stefano Sabatini To: FFmpeg development discussions and patches Date: Sat, 2 Sep 2023 01:14:45 +0200 Message-Id: <20230901231447.1486347-4-stefasab@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230901231447.1486347-1-stefasab@gmail.com> References: <20230901231447.1486347-1-stefasab@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] doc/examples/transcode: improve reporting when the encoder is not found 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: Stefano Sabatini 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: Also return EINVAL in place of INVALIDDATA. --- doc/examples/transcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c index 1ec4a3c230..aa6594f4ec 100644 --- a/doc/examples/transcode.c +++ b/doc/examples/transcode.c @@ -161,8 +161,8 @@ static int open_output_file(const char *filename) /* in this example, we choose transcoding to same codec */ encoder = avcodec_find_encoder(dec_ctx->codec_id); if (!encoder) { - av_log(NULL, AV_LOG_FATAL, "Necessary encoder not found\n"); - return AVERROR_INVALIDDATA; + av_log(NULL, AV_LOG_FATAL, "Necessary encoder with ID %d not found\n", dec_ctx->codec_id); + return AVERROR(EINVAL); } enc_ctx = avcodec_alloc_context3(encoder); if (!enc_ctx) { -- 2.34.1 _______________________________________________ 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".