[ffmpeg] branch master updated. 8d65da767b lavf: fix demuxing of FLAC files with id3v2 tags
The branch, master has been updated via 8d65da767b2b727a80672969f3120286ee478290 (commit) via 99285cba210399447bc9893dcc30e4882b3b7c30 (commit) from 82b5a0faba9ce558682de728586929bc19d106e2 (commit) - Log ----------------------------------------------------------------- commit 8d65da767b2b727a80672969f3120286ee478290 Author: Lynne <dev@lynne.ee> AuthorDate: Wed Sep 17 00:11:11 2025 +0900 Commit: Lynne <dev@lynne.ee> CommitDate: Sat Sep 20 22:46:39 2025 +0900 lavf: fix demuxing of FLAC files with id3v2 tags Due to the recent id3v2 refactor, FLAC was left out due to earlier code not checking for id3v2 presence on FLAC. Without the id3v2 data parsed, detection of FLAC and therefore demuxing fails. Fixes 9d037c54f209958d47ac376d2a9561608f98dfae diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index fc90c01ddf..347b66d6d7 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -385,4 +385,5 @@ const FFInputFormat ff_flac_demuxer = { .read_timestamp = flac_read_timestamp, .raw_codec_id = AV_CODEC_ID_FLAC, .priv_data_size = sizeof(FLACDecContext), + .flags_internal = FF_INFMT_FLAG_ID3V2_AUTO, }; commit 99285cba210399447bc9893dcc30e4882b3b7c30 Author: Lynne <dev@lynne.ee> AuthorDate: Wed Aug 27 17:39:16 2025 +0900 Commit: Lynne <dev@lynne.ee> CommitDate: Sat Sep 20 22:46:35 2025 +0900 lavf/id3v2: report incorrect BOM value on error diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 037d1a2e23..849f22c60d 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -273,13 +273,14 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, *dst = NULL; return AVERROR_INVALIDDATA; } - switch (avio_rb16(pb)) { + uint16_t bom = avio_rb16(pb); + switch (bom) { case 0xfffe: get = avio_rl16; case 0xfeff: break; default: - av_log(s, AV_LOG_ERROR, "Incorrect BOM value\n"); + av_log(s, AV_LOG_ERROR, "Incorrect BOM value: 0x%x\n", bom); ffio_free_dyn_buf(&dynbuf); *dst = NULL; *maxread = left; ----------------------------------------------------------------------- Summary of changes: libavformat/flacdec.c | 1 + libavformat/id3v2.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) hooks/post-receive --
participants (1)
-
ffmpeg-git@ffmpeg.org