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 9B6D8490E4 for ; Fri, 2 Feb 2024 15:23:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 785C568D0B4; Fri, 2 Feb 2024 17:23:48 +0200 (EET) Received: from srv-infra-1.infra.inf.glb.tvvideoms.com (www.inf.tvvideoms.com [213.205.126.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD0A968C58B for ; Fri, 2 Feb 2024 17:23:41 +0200 (EET) Received: from cji.paris (unknown [172.16.3.159]) by srv-infra-1.infra.inf.glb.tvvideoms.com (Postfix) with ESMTP id 6154C2074C; Fri, 2 Feb 2024 15:23:40 +0000 (UTC) From: Nicolas Gaullier To: ffmpeg-devel@ffmpeg.org Date: Fri, 2 Feb 2024 16:23:37 +0100 Message-Id: <20240202152338.609500-1-nicolas.gaullier@cji.paris> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/1] avformat/mpegts: fix first NAL start code splited in two different packets 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: Nicolas Gaullier 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: This issue happens in the following case: - unaligned PES and NAL encoding - the first NAL of the access unit begins at the very end of a ts packet, sometimes only the 0x00 of the trailing byte (unfortunately, this is still conformant to the standards!) - the video frame is so small (ex: typically still picture) it fits in a ts packet and a new PES is immediately started Two sample files can be found here: a) https://0x0.st/HDwD.ts b) https://0x0.st/HDwd.ts For sample a, the first NAL (AUD) is splited this way: 0x00 / 0x00 0x00 0x01 0x09 And for sample b: 0x00 0x00 0x00 / 0x01 0x09 ffmpeg -i input.ts -f null /dev/null => Application provided invalid, non monotonically increasing dts... Nicolas Gaullier (1): avformat/mpegts: fix first NAL start code splited in two different packets libavformat/mpegts.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) -- 2.30.2 _______________________________________________ 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".