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 5B0F645C95 for ; Fri, 2 Jun 2023 00:33:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F295368C2E3; Fri, 2 Jun 2023 03:33:22 +0300 (EEST) Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B87BC68C213 for ; Fri, 2 Jun 2023 03:33:16 +0300 (EEST) Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-55564892accso1073289eaf.2 for ; Thu, 01 Jun 2023 17:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685665995; x=1688257995; 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=T2J8mR6ATT4Fz9bZdKC0bc99YOFMxcDjTE9kXL6+mEU=; b=EACxy5M47216JaIJtdZ0KvgB5rrjUgYz1ZSYUDnQuMXbu2c51pQurEBoORCAoUrNQj v6uM2ZBKtBo3pA0lgjMBJH1dLy1deDbW+Edjkw9CB9NU9heN2IpWsQfInRKP+gHOHZIa 8kjPnFEqYRTIHs8pSeju78LD3Y06i4Dj/Uz/3IxqFlkQ6WQKqTZVMvGoQqNSPgqzjwhV DX9k3PCeqC9KywA5QnbvcLgPpqFoiL1SvlgHpGEaEZciFKHzR0qmr2GcQzLJmBbBWpdC 7/J1MTr+YuMtx/EkttLj1/UlmcgOdal5+k1x+jeZCDlgJXjZ+F06rTv7Bbjl2v8bR+E3 vbhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685665995; x=1688257995; 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=T2J8mR6ATT4Fz9bZdKC0bc99YOFMxcDjTE9kXL6+mEU=; b=Kk4/UPFUI3DLdoWSePomdLn7mfAv3LMvpyOj7GTwzDPtoQM+Uo4jfv99YAzqUPNw1i GAS2v5zUcUfgmrtAgbKN/UaPr826ccq//odewoy2SUSeTz6+x7qYCsHvrZJizuMA7lWz O5IfqBozhjUtGqlWYsJnvTV+w9fy9xYnH/08ylqM1e0Lj61Nrj/l5WBlHHrYM42VKuSl KkHYgyH7buq5ZWivdo0cVSoVtgXWzHCHv0F4mylGDZQdrtn6qxS0eMBSGxizQxh4IKIE iMgoY/hzHSEGvr7Rd3I++2BokcJ9/qySQkxOpepXA9ZKoN5nWnw0+xKFK2TBytRbW8Kn 9GEA== X-Gm-Message-State: AC+VfDxipWAGX519dadCkoSoGc/i1XIyhdmV+/j3PE79ZNGo9y9kEkmY 9w5pMJcy+RV1qBPQQfbBqjtEUwNTyII= X-Google-Smtp-Source: ACHHUZ56h6KP8IeFpwxDzV8/K0heGEPd0SCxKFc8vuW9pxRqWIZ1fB14X2rsrhl5v0bwplUysgiDUw== X-Received: by 2002:a4a:986:0:b0:558:4e10:6fc6 with SMTP id 128-20020a4a0986000000b005584e106fc6mr4529423ooa.5.1685665994627; Thu, 01 Jun 2023 17:33:14 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id f8-20020a4ab648000000b0055530a42ce3sm4881264ooo.34.2023.06.01.17.33.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Jun 2023 17:33:14 -0700 (PDT) Message-ID: <467d8078-3b3a-4e10-a07e-e4f2cd1edd60@gmail.com> Date: Thu, 1 Jun 2023 21:33:14 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230601222601.12631-1-michael@niedermayer.cc> <20230601222601.12631-2-michael@niedermayer.cc> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_av1: Clear obu.metadata on error 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 6/1/2023 9:28 PM, Andreas Rheinhardt wrote: > 1. Before 97f4263, the current_obu was reset (and the packet effectively > discarded) upon errors from ff_cbs_read_packet(); yet this is no longer > true and it seems that the contents of current_obu will be processed in > the next call to av1_receive_frame(). This change seems to have been > unintentional. I guess I assumed that ff_cbs_read_packet() failing would clear the CodedBitstreamFragment before returning, but if that's not the case then ff_cbs_fragment_reset() should be called. Would something like > diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c > index 5cc5d87c64..d1a0f6eaa2 100644 > --- a/libavcodec/av1dec.c > +++ b/libavcodec/av1dec.c > @@ -1461,6 +1461,7 @@ static int av1_receive_frame(AVCodecContext *avctx, AVFrame *frame) > ret = ff_cbs_read_packet(s->cbc, &s->current_obu, s->pkt); > if (ret < 0) { > av_packet_unref(s->pkt); > + ff_cbs_fragment_reset(&s->current_obu); > av_log(avctx, AV_LOG_ERROR, "Failed to read packet.\n"); > return ret; > } Be enough? _______________________________________________ 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".