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 EAE2740BBE for ; Tue, 28 Dec 2021 14:26:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EB50D68AED0; Tue, 28 Dec 2021 16:26:43 +0200 (EET) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB79168AE77 for ; Tue, 28 Dec 2021 16:26:36 +0200 (EET) Received: by mail-qt1-f172.google.com with SMTP id 8so16302176qtx.5 for ; Tue, 28 Dec 2021 06:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=Q+NyH9dDwiVg1Uxbcoz+ulRvzg4Ws7Rwjv6VZ8gPm78=; b=gqgVd52VPEX0kiixYDMHaXXSeaGTAU31jtkwoSWpxJdDWPtGCj6ipuTg9UdWiC6qME SBEyXLx19zItoWbi/H/zqwz0cwBVHdCJsI1MbseOCeROhT2qQWUq3CAi+GOrL7QrZTp8 zy+6Pm6vF0NeOovtkQNj9J89hCBJsxno/WVRZ/1+WmLO6HQGfFx+ydguwRrIlYNKIuyQ SLlwEAW1/kb9ikdokGSIkEnoIm7AZjLmtenJiduyCYIw5g3J3HHh8RpCQJqZB8N2gTNa 6h6KKecUQPBWsbYm358GFGgQ71di6mxSAI4bs/evINz2f97nd7YMU+xhRIcU5reHixgY webA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Q+NyH9dDwiVg1Uxbcoz+ulRvzg4Ws7Rwjv6VZ8gPm78=; b=69KROuQAV+e5rqy5GSDnBU8HZpraHJlwgaGoqEAu/T9kZUNj3v4FlDl+Bk8biiG9eP xL6fnz5gihscrAxywRc2HrQFknZHJuReT52aZnFQFt55p3UgbQi9xgHM5eNkO50AJEiV /HlWUJHjqNb9le1waCt3qn/C8hw3lkNtYSDci1kiVPbFG7X+3ZNKO5mUYK6+7wNq3c5+ xR4b9v/8U1Xefu33iwGJJ/sLby40H0KM4Fiqv+fnpogYCHZgW1EzTEmj7fE/TbuB+akx QId1TvQMmEgEIF/pTXPD276M6p5tLoH0MDlJpHDz7HksKuZPg8PevidQq7kEUSW/dQBa hr3g== X-Gm-Message-State: AOAM531A4ck7dCdmfLaqE1OhFTDYon3s3UU+hSw6z1a3pcqtShfzpzhr U4499q2dw5QZFUOph6MHD9xof/Q4WimZlA== X-Google-Smtp-Source: ABdhPJz7QR6R6fKxHSlM7x18rPd7pWY7TTSWcn0DUzUXE+EAlmeuQNV1eutdkIu1SLtzqatULr+Hmg== X-Received: by 2002:a05:622a:1c6:: with SMTP id t6mr18642340qtw.211.1640701595085; Tue, 28 Dec 2021 06:26:35 -0800 (PST) Received: from [192.168.0.13] ([181.170.250.138]) by smtp.gmail.com with ESMTPSA id 82sm10433532qkd.77.2021.12.28.06.26.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 06:26:34 -0800 (PST) Message-ID: Date: Tue, 28 Dec 2021 11:26:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20211228134929.1164-1-h.leppkes@gmail.com> From: James Almer In-Reply-To: <20211228134929.1164-1-h.leppkes@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] hevcdec: skip slices with missing PPS instead of skipping the entire packet 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 12/28/2021 10:49 AM, Hendrik Leppkes wrote: > Aborting decoding of the entire packet on a missing PPS can result in > missing the actual PPS on streams with badly ordered NALs, where the > SPS/PPS/VPS are stitched to the back of the previous frame, instead of > the beginning of the next frame. > > Instead, skip the undecodable slice, and let the decoder process further > NALs in the same packet. > --- > libavcodec/hevcdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c > index 3aa70e2245..c2451d682e 100644 > --- a/libavcodec/hevcdec.c > +++ b/libavcodec/hevcdec.c > @@ -575,7 +575,7 @@ static int hls_slice_header(HEVCContext *s) > sh->pps_id = get_ue_golomb_long(gb); > if (sh->pps_id >= HEVC_MAX_PPS_COUNT || !s->ps.pps_list[sh->pps_id]) { > av_log(s->avctx, AV_LOG_ERROR, "PPS id out of range: %d\n", sh->pps_id); > - return AVERROR_INVALIDDATA; > + return 1; // skip slice with missing PPS The decoder should IMO also set the output frame's decode_error_flags to FF_DECODE_ERROR_DECODE_SLICES in this scenario. > } > if (!sh->first_slice_in_pic_flag && > s->ps.pps != (HEVCPPS*)s->ps.pps_list[sh->pps_id]->data) { _______________________________________________ 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".