[FFmpeg-cvslog] avformat/flvenc: fix missing sequence start with MP3 tracks
Alessandro Ros
git at videolan.org
Tue Jan 7 19:46:08 EET 2025
ffmpeg | branch: master | Alessandro Ros <aler9.dev at gmail.com> | Sun Jan 5 13:13:19 2025 +0100| [9fe66c7fcbbba0bad16292fa775277944bf91a31] | committer: Timo Rothenpieler
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 <aler9.dev at gmail.com>
Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9fe66c7fcbbba0bad16292fa775277944bf91a31
---
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;
More information about the ffmpeg-cvslog
mailing list