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 7BCD74E2C4 for ; Wed, 30 Apr 2025 21:17:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B51C868AF2B; Thu, 1 May 2025 00:17:41 +0300 (EEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62311680A42 for ; Thu, 1 May 2025 00:17:34 +0300 (EEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-43d04ea9d9aso1248155e9.3 for ; Wed, 30 Apr 2025 14:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1746047853; x=1746652653; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YlbdKltCyV9HAgbsjjSjMwwDs3oY6f5WnLz7uN9JxHY=; b=cGWo8UcZsbq81NnqNG4wu5VszGdenlbPtC9CefbMTSg04Oi0tz88+JKcpwbLKx9Y+f 7BHaULaehPxYd2ZAykL1a238If/+iz9Q9Q3w18sfF9lTDgUdtPQODYAipvW/ng94OH6E ZyjNjIYFuhKJxLDljXxjDjX9YKjOyPny+UlRghQLMC3XmTTtga79uTJWu44+IVSN5srM aRgUpdYYsRFqRkShyGLHyT5h7m42YNSE1RdE+z3NdNboVDKGaFtyzG1R4LQhSjNvSTpI rVbAIHxjzXNvg00CqKqaXzsR8+hVuAkA28QKd48roHt8yGwWLAE0vciElkva21cn+314 XxvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746047853; x=1746652653; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YlbdKltCyV9HAgbsjjSjMwwDs3oY6f5WnLz7uN9JxHY=; b=KHutkMV9SVYJCzlswmBUQV+RhWd0Fpr4+rtNTc7dXFy8B2RjnV4qIYa3z+DE5Dj3V7 DDSeLYtEPF/QA/md0ZmRrjUlEHbRYNRRnbUFEp8GHfRmyUz/YucVc/sQB77QMRzyHkSH 3hIiZgBZeRzQ7VNCdrhm5fsmeJthVMmKgb994Ev+8uV2naaC2BQ4XxQVkPL70N1u1cpf J7Hr6Bt5slsu46tqABDY9rsA1Ya59YQHRfpnz2RnbLBQ3b0aQDdh6epnMUV1aLKVTqFH o3Qwa4OB2eHYLZ2QT5naRq+0+0oLiUlr0J6yRwERAs56rY7/5F7I6TAK9DTdN2Qq/dfu nQjg== X-Gm-Message-State: AOJu0YwxySJIYEBTHN/HOEY1Ttq8I5gJWp4jhnSs1I80AiIAKMfU4w1t jgSFvL+fNGaVtp3wkEEBVXHw+8g2YRyChkEaf3l7Ls1EIOzTtpaRbaSeVoyPUdUcNfQtxvxzPN9 07UQoRA== X-Gm-Gg: ASbGnct1nQ9GIhpDso0R+DwjM4VsyNlNlH61r7ajVKwBPyRtmb28swH3g1SNLpP9eUW rtN8w96YHyxUW7whSf/v4X+k+HsNMtr0RURZTjDoO4es8rQPSxi+G92JhB6I/l4vt6a4wx0+TcU qSSK4ghcs/1AmFxT0ZP+JPQQMuSIA1oknXt4AEDnzs79OYL58bqtEyUeM69mgKHHAbKSfuK0D7J eVtXi6h2yO4h4MSY5csHwiPHEaFT1Iqt15HMI3Gi4ApxK7WOGv6BkhDgbMZzdcI2Br715S1vbtB bPbP+hYvPtUULPc5zPwlOB6Jy+DiUx9ixc8Vohx+L1reqLdENHkv98/LivoG9nUsjhY+fwgTrWl ewfXpmqqgYwD0fg== X-Google-Smtp-Source: AGHT+IF6JNPXCjN/ZzYjCCfIUVrWZaIpaV6DeTMPZ2KJhwPjFguJvxo5n/WR+FVGIjjMpREo5eetqw== X-Received: by 2002:a05:600c:3b8b:b0:43c:f689:dd with SMTP id 5b1f17b1804b1-441b650073dmr5238925e9.19.1746047852686; Wed, 30 Apr 2025 14:17:32 -0700 (PDT) Received: from [192.168.0.15] (cpc92320-cmbg19-2-0-cust719.5-4.cable.virginm.net. [82.13.66.208]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-441b2b28796sm36460515e9.33.2025.04.30.14.17.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Apr 2025 14:17:32 -0700 (PDT) Message-ID: Date: Wed, 30 Apr 2025 22:17:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20250429195738.829-1-jamrial@gmail.com> From: Mark Thompson In-Reply-To: <20250429195738.829-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/cbs_apv: don't return an error when reading empty buffers 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 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: On 29/04/2025 20:57, James Almer wrote: > The output will be a fragment with zero units, which is a lot more user friendly > than making them think something went wrong, as it already happens with cbs_av1. > > Signed-off-by: James Almer > --- > libavcodec/cbs_apv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cbs_apv.c b/libavcodec/cbs_apv.c > index 2c4a1daaf0..66ea4cebab 100644 > --- a/libavcodec/cbs_apv.c > +++ b/libavcodec/cbs_apv.c > @@ -175,7 +175,7 @@ static int cbs_apv_split_fragment(CodedBitstreamContext *ctx, > > if (frag->data_size < 4) { > // Too small to be a valid fragment. > - return AVERROR_INVALIDDATA; > + return 0; > } > > // Don't include parsing here in trace output. Seems fair for a zero-size buffer, but I don't like this for a three-byte fragment containing { 0xab, 0xcd, 0xef } - that feels like it should return an error. Maybe it would make more sense to have a separate check for zero. What do you think? Thanks, - Mark _______________________________________________ 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".