From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 668844C6D4 for ; Mon, 26 May 2025 12:46:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7E53368D435; Mon, 26 May 2025 15:46:30 +0300 (EEST) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id BACA968C929 for ; Mon, 26 May 2025 15:46:23 +0300 (EEST) Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4b5b9S3vvyz9svd for ; Mon, 26 May 2025 14:46:20 +0200 (CEST) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 May 2025 18:16:04 +0530 Message-ID: <20250526124604.18404-1-ffmpeg@gyani.pro> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4b5b9S3vvyz9svd Subject: [FFmpeg-devel] [PATCH] avformat/movenc: disallow buggy flags combination 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: Usage of hybrid_fragmented and faststart together can result in files with loss of sync and bitstream parsing errors upon playback. --- libavformat/movenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 4bc8bd1b2a..9392ba5370 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -7731,6 +7731,12 @@ static int mov_init(AVFormatContext *s) FF_MOV_FLAG_FRAG_EVERY_FRAME)) mov->flags |= FF_MOV_FLAG_FRAGMENT; + if (mov->flags & FF_MOV_FLAG_HYBRID_FRAGMENTED && + mov->flags & FF_MOV_FLAG_FASTSTART) { + av_log(s, AV_LOG_ERROR, "Setting both hybrid_fragmented and faststart is not supported.\n"); + return AVERROR(EINVAL); + } + /* Set other implicit flags immediately */ if (mov->flags & FF_MOV_FLAG_HYBRID_FRAGMENTED) mov->flags |= FF_MOV_FLAG_FRAGMENT; -- 2.49.0 _______________________________________________ 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".