Message ID | pull.48.ffstaging.FFmpeg.1673365328.ffmpegagent@gmail.com |
---|---|
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp4037936pzb; Tue, 10 Jan 2023 07:42:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXuK5eQeQSq9+7NRCE0mhSfZkEpm4HupxciCBiK6BfTyr1SI+3Sc6x+nr81xDtw2HJ7bziXG X-Received: by 2002:a17:906:6dcb:b0:7c0:d60b:2887 with SMTP id j11-20020a1709066dcb00b007c0d60b2887mr59740075ejt.69.1673365353060; Tue, 10 Jan 2023 07:42:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673365353; cv=none; d=google.com; s=arc-20160816; b=fLI9Ft+xgyIWk6L5niJmCm/YHRUyr5T2YyrglXpAnQu8DI2ixyNxFKiei6M+jTFv+t nhGnuAPOX38/dvZgFcTDgRwP81inzrGtomlKc6h7StCzN7KW41HpY4Z1sp4j+Er/W4VX Nuaf58uoJMWkA2zzebWQ4q5M+MOvBSGCsLcD0z/otjJpTgSPfrRTDQR9Djtm+LMJsFGt c3MDLtAmFuJJRPmgMmhZG4Au210CAD4NlbMQ7hhSQQOYiTN+9gvxR8Od0oFJxlgq6lVa /sUIorrtTmEuDa4Tr41XK3djfW/ksAOGm81sIClWwupvPc13FJ16bd56SUOyBNGHBWrm LJWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:from:message-id :dkim-signature:delivered-to; bh=Fc6rylmf9eqfZvRjhg10yB9Ie5xjkQ8GrMXc4ImYvxg=; b=rlpWxaTA+Ru5WbzRMsGRAyeMkdFY0wm24KO1HShl2FmovfiY2PG79jEpS+0tgYNdnM UFNlKokfjXiZbXYCUpz1BkWs1b/RMrzA910aGdGpOvY8+3kFDfll8FFI+TSb9C5F14HR bm2L5KWorWk9kAmEcHYA2650tFMl+y+5HWOzdawrryDowlsGGGc9bZE8ibYAtfgJ9fUY AfqG1OmeJ+t9siDeLT+YsReCwwv6cyxcXCubxAk6ZGd+IwCpMs25mdAwOOmrwTE4pclY hbtA6JdOug3gSDwwlupWeg37WNFmEfG+IVuLoULJh/1DBUdX/12NgU4HKKqpfqgtPBeJ /TqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lKmG2cVC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g10-20020a1709067c4a00b008225eae8881si9207444ejp.312.2023.01.10.07.42.23; Tue, 10 Jan 2023 07:42:33 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lKmG2cVC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1368C68BD19; Tue, 10 Jan 2023 17:42:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5BE0068BCDA for <ffmpeg-devel@ffmpeg.org>; Tue, 10 Jan 2023 17:42:12 +0200 (EET) Received: by mail-pg1-f181.google.com with SMTP id q9so8499411pgq.5 for <ffmpeg-devel@ffmpeg.org>; Tue, 10 Jan 2023 07:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Lc8n5p69lhLXmilDeLYYTw/Q318cg+7AohHU8fC6b0M=; b=lKmG2cVC5fZyawscV9LICFhMDBBjyIkq390/up0OXJKAw0PQoh+4E5GvufIqiK2qgG kdnKBgKd0a3laAcK2hWuqGzumeRbWqL0QDGC1wPsWR6DrEzxB/NBA9lV9nYJ3SeInnMI 6l65Mkd/kg0z2nAfKzP/cBhxIFNk6W9c9cwZczk9f7w5bCQoWh5c8/gTLOa8M6Vkg/Sq OvE+keqPss/2DvJzihoz9sYlWPZ8cIOUejE/c/wmhcmGtQkCg0D6h7DTzCkyyRgskz/a TK3Egf7ZxOT2tsWkk7fS8swPE14c27RQ0JPCkAtmVZ/N8qw6PNOSN5u8fnrKinHStGR8 7idA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Lc8n5p69lhLXmilDeLYYTw/Q318cg+7AohHU8fC6b0M=; b=VxNN82bLRQX5VOH3dYzgNROnxPwI8+fisgMXnstWFCXpoTyN099dt+LIMounDAElLN X2ak8P9E871ShcUTKUxBMS6OSw4RELpKTRuZYRA6R5JbV/CPYaj0/BmqPxdKfu4U04l0 pDTuOxf9gIIrXd9N2/Ed8AGFb+s4oXrc7fnk2QEBUGwoyFUsVmUOw9UqRoANU8PIHU/G 15vkA40dTcCti+d2uWKLF0pKoHtYD9ceI0kH5v8iHPdOtoB/04ESem/P2xxGARqe9urp QwpZjGSZnDAacCP3YXNk9FcgsyZAk8mEGmKv1B5wJLQ1fQtLw5LqOssVMsjwWklhZrsU XUJA== X-Gm-Message-State: AFqh2krXeKSK+gr7nEXCE/k+6w6emH9Li04jURAoxNB5VWvGy6PrW0sc Z2rSWbzi7E/GBcCZZkE+du8P1uml7y4= X-Received: by 2002:a05:6a00:1a45:b0:582:294d:f465 with SMTP id h5-20020a056a001a4500b00582294df465mr39246565pfv.13.1673365330457; Tue, 10 Jan 2023 07:42:10 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id y29-20020aa793dd000000b0057462848b94sm8183607pff.184.2023.01.10.07.42.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2023 07:42:10 -0800 (PST) Message-Id: <pull.48.ffstaging.FFmpeg.1673365328.ffmpegagent@gmail.com> From: ffmpegagent <ffmpegagent@gmail.com> Date: Tue, 10 Jan 2023 15:42:06 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 0/2] libavformat/matroskadec: set fixed duration for subtitles X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Miguel Borges de Freitas <92enen@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: UXEBgsOzDGT5 |
Series |
libavformat/matroskadec: set fixed duration for subtitles
|
expand
|
Hey guys, Any feedback on this patch? Regards
The matroska specification states the start time and duration of subtitle entries are encoded in the block TimeStamp and BlockDuration. Furthermore, for all subtitle formats except S_HDMV/PGS the BlockDuration must always be defined and have an absolute value even if it is simply 0. ffmpeg assumes that a duration of 0 means the duration is still unknown and tries to adjust based on the next packet pts. This is wrong for all formats except S_HDMV/PGS. Since changing the semantics of duration 0 is not an option (touches too many parts of the code) this change introduces AV_PKT_FLAG_FIXED_DURATION flag which decoders might use to flag the duration of a given packet should not be changed. Signed-off-by: Miguel Borges de Freitas enen92@kodi.tv ---------------------------------------------------------------------------- This is my attempt at fixing https://trac.ffmpeg.org/ticket/10135 Initially reported to Kodi in https://github.com/xbmc/xbmc/issues/21625 Miguel Borges de Freitas (2): libavformat/matroskadec: set fixed duration for subtitles fate: update test reference data to include AV_PKT_FLAG_FIXED_DURATION libavcodec/packet.h | 5 ++ libavformat/demux.c | 3 +- libavformat/matroskadec.c | 4 + tests/ref/fate/matroska-dvbsub-remux | 84 ++++++++++---------- tests/ref/fate/matroska-zero-length-block | 4 +- tests/ref/fate/matroska-zlib-decompression | 2 +- tests/ref/fate/shortest-sub | 92 +++++++++++----------- 7 files changed, 102 insertions(+), 92 deletions(-) base-commit: 94aa70d757af6b0e0919250f9def2a819aa00358 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-48%2Fenen92%2Fass_mkv_fixed_subs-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-48/enen92/ass_mkv_fixed_subs-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/48