diff options
author | Lynne <[email protected]> | 2025-08-27 17:39:16 +0900 |
---|---|---|
committer | Lynne <[email protected]> | 2025-09-20 22:46:35 +0900 |
commit | 99285cba210399447bc9893dcc30e4882b3b7c30 (patch) | |
tree | 60123ea2eb78be74aa47dce1ca8888aab7f8da51 | |
parent | 82b5a0faba9ce558682de728586929bc19d106e2 (diff) |
lavf/id3v2: report incorrect BOM value on error
-rw-r--r-- | libavformat/id3v2.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |