From 9fe66c7fcbbba0bad16292fa775277944bf91a31 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Sun, 5 Jan 2025 13:13:19 +0100 Subject: [PATCH] avformat/flvenc: fix missing sequence start with MP3 tracks When muxing to FLV/RTMP a MP3 track with an ID greater than zero, enhanced RTMP has to be used, and a sequence start should preceed track data. This is already implemented (see line 823 of flvenc.c) but the code is never reached due to a too-strict condition before it. This patch fixes the issue. Signed-off-by: Alessandro Ros Signed-off-by: Timo Rothenpieler --- libavformat/flvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index df429836df..f026f0e53b 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -807,6 +807,7 @@ static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* par, i if (par->codec_id == AV_CODEC_ID_AAC || par->codec_id == AV_CODEC_ID_H264 || par->codec_id == AV_CODEC_ID_MPEG4 || par->codec_id == AV_CODEC_ID_HEVC || par->codec_id == AV_CODEC_ID_AV1 || par->codec_id == AV_CODEC_ID_VP9 + || (par->codec_id == AV_CODEC_ID_MP3 && track_idx) || par->codec_id == AV_CODEC_ID_OPUS || par->codec_id == AV_CODEC_ID_FLAC || par->codec_id == AV_CODEC_ID_AC3 || par->codec_id == AV_CODEC_ID_EAC3) { int64_t pos;