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 4C63E49A78 for ; Thu, 28 Mar 2024 00:57:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5D0FE68D5B3; Thu, 28 Mar 2024 02:57:06 +0200 (EET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF41368D5A7 for ; Thu, 28 Mar 2024 02:56:59 +0200 (EET) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-34261edaf7eso245608f8f.1 for ; Wed, 27 Mar 2024 17:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711587419; x=1712192219; 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=YNLG9b3f3FNfvjfXxfP89Nxl1z0Si9jDVkxRlML6pUo=; b=mPsN7GAE/JDPBS+wAoz7b/mjIiFkq9dJLl/Ml3BAsT35VwWaMGvoHLHRDZUKcKcIfh yBYPQMU0zcprvwl4Cx07OZjNn5vsVwUDoX3c5YPfPvr/uei+nshDWWVv0LyVt36TiJ3a vjIsH8RdsE7GttG6rpennFgU3f4QUO65G5E16ZgRBVON53ya0EgB9ya1JkPPwvhjaFzQ k8vUteS541yB3qv/HiDWWem4V/OzVFwWt54V+LqXKYR+04RoWtmhf8Ec+5pAP8rxrFNE rwSpIwtWH/YZhkBXIQkgzA/u/X4KtTybJg9QZWxgKwx3hli0+tJ1xmf+zce2w5MCNpvn 3sgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711587419; x=1712192219; 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=YNLG9b3f3FNfvjfXxfP89Nxl1z0Si9jDVkxRlML6pUo=; b=B/Xgwjk2YFUoDEeJ+sBusm8J9h/Q0KDRNx4kF3+hI031r1C3+CGaTOyGWQq3j6Ktsq mPpU9N5uptS1iSmQowtlzFp/WQ5+f1PHRFsWfw+GOK8ZsARIbtVE3R8fxDW2U4awwGrx pWTPZu4gekedgVVserCgVeYETBSqbdgJg4vZPk0z46sg2GtQrcm6jB/DFeUaILkU+n3k TXdRonCHbUgaIo+1xBovJtAuaWizu4MKbOyIk9MCUuC73ZxMU4a0hodnOHxQk0YDW1hm sZEKhHbpeN3+CWm6CzgxyaYqGkKcCIGtXbIYZ+8X49Tw822yGohDsp1mlT9o9WHTZQO3 241g== X-Gm-Message-State: AOJu0YyJEa1w3XhEsulObl1BPy8iI52qQuz9LCD61yNnE0xRV6UEBlkj BOkra+5ZFJxXwwTxHCKQMjbBOIfQ6HAL9HCJsS3Em7GmbxGt13H8Q2p1FOKN X-Google-Smtp-Source: AGHT+IHV1fRJP0PiA2h8AQgE/VGkarK9NsdJ2NH0qo7WtgFPl3I/j5X1RuNQpR5947LLHwXc0tSsug== X-Received: by 2002:a05:6000:541:b0:341:c454:7ad8 with SMTP id b1-20020a056000054100b00341c4547ad8mr934364wrf.13.1711587418983; Wed, 27 Mar 2024 17:56:58 -0700 (PDT) Received: from localhost.localdomain (dynamic-078-055-195-187.78.55.pool.telefonica.de. [78.55.195.187]) by smtp.gmail.com with ESMTPSA id m28-20020a056000181c00b00341d186a2dbsm325529wrh.14.2024.03.27.17.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 17:56:58 -0700 (PDT) From: arch1t3cht To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Mar 2024 02:56:37 +0100 Message-ID: <20240328015639.1425494-2-arch1t3cht@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328015639.1425494-1-arch1t3cht@gmail.com> References: <20240328015639.1425494-1-arch1t3cht@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/h264dec: Properly mark frames as recovered when draining 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: arch1t3cht 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: When decoding starts at a SEI recovery point very shortly before the end of the video stream, there can be frames which are decoded before the recovery point's frame is output and which will only be output once the draining has started. Previously, these frames would never be set as recovered. This commit copies the logic from h264_select_output_frame to send_next_delayed_frame to properly mark such frames as recovered. Fixes ticket #10936. Signed-off-by: arch1t3cht --- libavcodec/h264dec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index b4973fce29..8503ea018a 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -1013,6 +1013,9 @@ static int send_next_delayed_frame(H264Context *h, AVFrame *dst_frame, h->delayed_pic[i] = h->delayed_pic[i + 1]; if (out) { + h->frame_recovered |= out->recovered; + out->recovered |= h->frame_recovered & FRAME_RECOVERED_SEI; + out->reference &= ~DELAYED_PIC_REF; ret = finalize_frame(h, dst_frame, out, got_frame); if (ret < 0) -- 2.44.0 _______________________________________________ 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".