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 5E11E4085D for ; Tue, 1 Feb 2022 01:58:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E225068B211; Tue, 1 Feb 2022 03:57:50 +0200 (EET) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BDC3268B1B5 for ; Tue, 1 Feb 2022 03:57:44 +0200 (EET) Received: by mail-ot1-f43.google.com with SMTP id e21-20020a9d0195000000b005a3cd7c1e09so8085591ote.6 for ; Mon, 31 Jan 2022 17:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6ne16MURgLdrH3v9jmUEoRYP08GoLIOSC5nvydIHQ9o=; b=kLdxeU6TGt2xqHgsNLQXLEZAy0EhXpJMdRwWcL88L38ZvlayCZb43SGho2yp5932hv B5F5ap9+FPooCGtW8l55Keeydav8wIakrGatpV0QrTz0oEYt6FKjpuhEFYOn3vLOXQgF Zvue8SUDGme0wKtRYvLbgV16IW9W/k9U2E/c4Aj+a/l7xlA648lpuDOePf/LoNPF60t/ VZNcQ+WpDuDN3S35knDoZKs9Fa9Xr1gwCsB6WC0uFjwuTkPfspOLxs6DjMyYlK5BFfJ3 4fvlimQqtK/T8NCjVKWRj1VbO1d7yIvyygmOh+qo2Aoutoh3UCR03283de3i+JHHvtYJ ctYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ne16MURgLdrH3v9jmUEoRYP08GoLIOSC5nvydIHQ9o=; b=IlGcmNOfJ0ItYgX7VQC5ft6twTEJG6sFzJE+c1MvtbzoaTSQv3hDFjfLrnhJrx5LRu uQ9NX0udzhCxjdk0DVBgobS11seELvsmV3Go0cwarU2PQXNa8aV0mOsVmfI28r0twtB6 XP/8BOhoOMvsPezxovnDxn3+raT74ZGEnaZiG5NRUDW2iMiwexxQ2mvqtaa2QZFdEhXW fII9V21r8w9SJgLdMW7Hr2eVY8OKDVEAplGZpAKHtk/dsjmzn5AIP0Qt0bIidrMTdZcF BVp+/9oN9BbhsKB5b225g7kVF/BH2LaQd75AOT7va8QAH+G4ofeobcc6Hw55JTp5Bc9o gIlA== X-Gm-Message-State: AOAM532uL0XfD0FhYrnLVL48vIXIdILmRzOSdRIQa3saB8WP/UFvvhoI +EVJSzHiDHbzU+NUfBqvwgUGi16nznw= X-Google-Smtp-Source: ABdhPJxqaPuGUUXLthgKr4wqCH320tsFH/TkE/cKrLKwmi5/o52/jhsfMWiYl6K8WQc6y7Ebgdbg6A== X-Received: by 2002:a9d:6d01:: with SMTP id o1mr10208055otp.204.1643680663122; Mon, 31 Jan 2022 17:57:43 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id x1sm10811532oto.38.2022.01.31.17.57.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 17:57:42 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Jan 2022 22:56:48 -0300 Message-Id: <20220201015648.2086-4-jamrial@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220201015648.2086-1-jamrial@gmail.com> References: <20220201015648.2086-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avformat/demux: don't truncate the return value of ts_to_samples() 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-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: Signed-off-by: James Almer --- libavformat/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 4509015847..ec34b65288 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1346,7 +1346,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) if (sti->first_discard_sample && pkt->pts != AV_NOPTS_VALUE) { int64_t pts = pkt->pts - (is_relative(pkt->pts) ? RELATIVE_TS_BASE : 0); int64_t sample = ts_to_samples(st, pts); - int duration = ts_to_samples(st, pkt->duration); + int64_t duration = ts_to_samples(st, pkt->duration); int64_t end_sample = sample + duration; if (duration > 0 && end_sample >= sti->first_discard_sample && sample < sti->last_discard_sample) -- 2.34.1 _______________________________________________ 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".