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 F26DB479AB for ; Wed, 26 Jun 2024 10:58:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 02AC068D5A9; Wed, 26 Jun 2024 13:57:50 +0300 (EEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD34D68D58B for ; Wed, 26 Jun 2024 13:57:41 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52ce674da85so3415255e87.2 for ; Wed, 26 Jun 2024 03:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1719399461; x=1720004261; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FgQ5qqOS1EsRuYY7hnMNz9SosuPY7CtN4YvUDaFPt28=; b=UmGg6MAR8QTg2DUpu/V3vTh9J+f/9Wngixs2D2KlwovuPgCAxTnfOjg1j6DhblWWJq a60tPcU3AUCHIJQRUo1bSw2n6trcyBKAZUv/fcZ+C9qs4PgU46LgWov2IHRssWeZnY/a hV2LubWNorCWyY8vj2FuGqOJEzAssreicxEGINSKXx5epUcNWSk/dcwHi0nwkBXWQtlA rR1sydM2gpDtEH2+5w5x8Ldd69PkSHxo7Yz2efeqgvkziwxUXSCmzl8Q245znxc91NrL JStSmquLgm4T+bz+zVBJPqB+JYDWas3os4RO62EvOwZhNb+Dre7QmL1T/Zi/AYLbb9Nv FLEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719399461; x=1720004261; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FgQ5qqOS1EsRuYY7hnMNz9SosuPY7CtN4YvUDaFPt28=; b=fjHTRD7Ng+p9MaadtXvrjgh8LgIOJuu1I9GdzqebfiT0NiW3YDHAzqWfLBgTwrk1FS TXJ9KqDlWHW6SUI30FltY0OgWP7RBpq6hWQLYXEzkVH7dn7mdo/ypE5RyEBQqg678umJ dM8Aw3g/zMQXUfYIQcBZD5Kp6HSeYzLqByPhlD+UtAJNLobO1ADnQ8cQOMU+xYG4oMdE z6l6dQ1DJB+bUiomgS307TnQ9oXui2t87xlIum8IC2oOaCSboq9scwrgbqVM3QH3cTZI gzHaKT11SFgW34Sx+BEbJfUQdHGO7olP01kurOkzzHpwyDRxQY9nPqdiDKt4Fw/ZpvSx OZ9g== X-Gm-Message-State: AOJu0YxOzBwEks0PwNDtirDG413jjMS0y7yshBrKrydyCF5+raDRG8T7 HHHT/9XJDpOSMbEV4VJmoCM4YFOPemb4NLqzG9SBynuY3tCrzzR7RL5tRV2/AaaB12WLpAZgacf XUQ== X-Google-Smtp-Source: AGHT+IG8o/VBQn664t45TL7nXRSOCS5ElttYJWeAOHYHPzSTd/4uEtRaiEb8Uzp3U6O1vFRmD1RXDA== X-Received: by 2002:ac2:5588:0:b0:52c:e133:7b2e with SMTP id 2adb3069b0e04-52ce183b175mr6478641e87.35.1719399461075; Wed, 26 Jun 2024 03:57:41 -0700 (PDT) Received: from localhost (host-114-191.parnet.fi. [77.234.114.191]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ce8890c68sm742120e87.103.2024.06.26.03.57.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 26 Jun 2024 03:57:40 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 26 Jun 2024 13:57:37 +0300 Message-Id: <20240626105738.58427-4-martin@martin.st> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20240626105738.58427-1-martin@martin.st> References: <20240626105738.58427-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 4/5] hlsenc: When not using HLS_SINGLE_FILE, set vs->size to range_length 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: Steven Liu 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 matches what is done in the corresponding case for HLS_SINGLE_FILE. Normally, vs->size is already initialized correctly - but when writing the initial segment, with mp4 files, vs->size has been set to the size of the init segment, while range_length contains the real size of the first segment. --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index e9aff1d0f7..7c8c886fc3 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2587,6 +2587,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) av_dict_free(&options); return ret; } + vs->size = range_length; ret = hlsenc_io_close(s, &vs->out, filename); if (ret < 0) { av_log(s, AV_LOG_WARNING, "upload segment failed," -- 2.39.3 (Apple Git-146) _______________________________________________ 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".