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 09E8445262 for ; Mon, 16 Jan 2023 03:23:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B183F68BD0A; Mon, 16 Jan 2023 05:23:29 +0200 (EET) Received: from out203-205-221-202.mail.qq.com (out203-205-221-202.mail.qq.com [203.205.221.202]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 491BC680390 for ; Mon, 16 Jan 2023 05:23:21 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1673839397; bh=eSzBtdtJD/IZ9AbvV0aHMHkArAcGt2lovofIzsEXfLI=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=H8kGkJR8p/TlS4CXG71r6PWd3UgZOBofw+eVMErZoSUMPeqXYp6GjBYeE5Anh8BdD D6iTj3QFAr0cyd7H2uJrpllCeqdqMtSzZ0gmVxeEkqDg1W1gJdMoRVo4VHuCcllvtc /c1jodTUKVl6YSzlkBhHY8a7i9n0AJP13c6n8YVw= Received: from smtpclient.apple ([119.147.10.193]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id 5CFAC6AB; Mon, 16 Jan 2023 11:23:15 +0800 X-QQ-mid: xmsmtpt1673839395th2zmqyf1 Message-ID: X-QQ-XMAILINFO: OLnGMPzD2sDVt3GxsY48iSjMq+TEMvQgRvUgfcz7LkOQtRilvbdV1Bl8bznlbT i5vOpzwV0VmGjgeQT+FIYAmxdbKRE4c/gDoXWD2MC771vT3kpTY8Jx7BfvKr2xJqknp7AU1ALE6E 1p4gT/zYdXCjuaCNjJqoFuRcTEQVc6Df5FhmOcw8aBqsPupURQv2d+TtZ9EZXv95QLbkMAbFEyHt LP10Lh8+CkEf1sF0OtYC4b68Ca31rjYjviqitRjg4rr92umoVNyJX3xpPSklFQpT0PtkA+K00B2L I+0xqVvxMcGTZg08iq8jeBwQSjmGLr1WshaL6nZ6d94rNP+A6qVSZIFudGJN+PGpsOSEPV+Q7REY 8pxIyDXeubr9TgrORlooLRg/l9NQTZ+67+JiZj1BkQGFQcpJZTngcsjsFP3Ki71qwXKzdb8xIJvK svXHW75guOxyRkFlzqP6kLzq+3DJP7Q5E9AqPZ5n+D81n1M6qW7924wWPWIkKXsPxYeHLDJ3NOLv B7vrnG3yfBBj/w0eAIIwgqmmhjmcvUzs4Pqr+DJLEFSKjwoXSlefT8g07pDntIpKeDyZGnZzzuNF SUIiAmL/07EeSOnAkTOjVTknZwbqsOivHsbbKhDHV6mCx+k8n6UZx1Itc0FtnSRLGqmX5tfe4qDS T8xMzWrKvWNZhzFgxsuLGDG96rpvGQJcTGKuAbkPPMZV+mnljrbWbsU0JaowqA/qVP9ztEAariKK +CSfa498AXrPAf82k8UdNGZU3eAtY0tiwiG2gtCb2IJIBxII/FLkNAkjUTGFvBm0r/blG0WlFNhC 8Xb13kFX65ysOt2ucS6DDYQNx2tCSlDkYG+QLz/mDCmNALnAjTPyrkIiZXAE2XKftQz81X0yMm57 n8OUxXCrR0My42/OA5VzqEy1oh/SvIChajtMX2yH41poZnKZCub831xb4R/aopDqqxRJjH90zMCm SRTo5+2A/kw+JDvjUWeo+7cBJ+cBKBzuPc9HVDsDqzvQgVSRMP81U8thoI/dUWgPEf6Oc37Ts= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) From: =?utf-8?B?InpoaWxpemhhbyjotbXlv5fnq4spIg==?= In-Reply-To: Date: Mon, 16 Jan 2023 11:23:17 +0800 X-OQ-MSGID: References: To: FFmpeg development discussions and patches X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: fix missing SPS/PPS to IDR frames 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: Andreas Rheinhardt 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 Jan 10, 2023, at 23:31, Zhao Zhili wrote: > > On Tue, 2023-01-10 at 07:41 +0100, Andreas Rheinhardt wrote: >> Zhao Zhili: >>> From: Zhao Zhili >>> >>> If there is a single group of SPS/PPS before an IDR frame, but no >>> SPS/PPS after that, we will miss the chance to reset >>> idr_sps_seen/idr_pps_seen. The result is missing SPS/PPS for all >>> IDR frames except the first one. >>> >>> Signed-off-by: Zhao Zhili >>> --- >>> libavcodec/h264_mp4toannexb_bsf.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/h264_mp4toannexb_bsf.c >>> b/libavcodec/h264_mp4toannexb_bsf.c >>> index d11be455c2..bbdeca9c44 100644 >>> --- a/libavcodec/h264_mp4toannexb_bsf.c >>> +++ b/libavcodec/h264_mp4toannexb_bsf.c >>> @@ -259,7 +259,7 @@ static int h264_mp4toannexb_filter(AVBSFContext >>> *ctx, AVPacket *opkt) >>> >>> count_or_copy(&out, &out_size, buf, nal_size, >>> unit_type == H264_NAL_SPS || unit_type >>> == H264_NAL_PPS, j); >>> - if (!new_idr && unit_type == H264_NAL_SLICE) { >>> + if (unit_type == H264_NAL_SLICE) { >>> new_idr = 1; >>> sps_seen = 0; >>> pps_seen = 0; >> >> If I understand you correctly, you want that to include the parameter >> sets from the extradata to every IDR frame without extradata if said >> IDR >> frame follows a non-IDR frame after in-band parameter sets. There is >> just one problem with this: Said in-band parameter sets might >> overwrite >> parameter sets from extradata and inserting the outdated parameter >> sets >> from extradata lateron might make the stream undecodable. > > It's a good question. Current code works when an IDR has in-band > parameter set, which is different than the out-of-band parameter set, > and the decoder doesn't miss the in-band parameter set. But there is a > high chance the decoder will miss the in-band parameter set for annexb > bitstream, e.g., playback at the middle of a live mpegts streams. It's > a serious issue of missing periodic in-band parameter set for annexb > for a lot of usecases. Handle new parameter set isn't as common as the > need of periodic in-band parameter set (I guess). > > It's not a new issue that this bitstream failed to update the parameter > set, for example, it doesn't handle AV_PKT_DATA_NEW_EXTRADATA. I can > add support for > 1. handling AV_PKT_DATA_NEW_EXTRADATA > 2. handling in-band sps/pps > > But it won't be soon. Ping. > >> >> - Andreas >> >> _______________________________________________ >> 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". > > _______________________________________________ > 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". _______________________________________________ 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".