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 45B5845168 for ; Tue, 10 Jan 2023 15:42:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DAC5568BD16; Tue, 10 Jan 2023 17:42:18 +0200 (EET) 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 ; Tue, 10 Jan 2023 17:42:12 +0200 (EET) Received: by mail-pg1-f181.google.com with SMTP id q9so8499411pgq.5 for ; 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-Google-Smtp-Source: AMrXdXvxhbzCNUqQQ5T7kxx3TKzOKd8seIhLaIC1OGlKNugm5M+Fhvl2fWz3e6i4zdhyAGCPAf9WAw== 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: From: ffmpegagent 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches 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" Archived-At: List-Archive: List-Post: 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 -- ffmpeg-codebot _______________________________________________ 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".