[FFmpeg-cvslog] avformat/iff: ignore FVER tag when not processing DSD/DST files
Peter Ross
git at videolan.org
Sun Jan 12 02:19:12 EET 2025
ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Thu Dec 12 15:44:44 2024 +1100| [2202dcfc0fbee51e0fe280877fedf07e6762f3a4] | committer: Peter Ross
avformat/iff: ignore FVER tag when not processing DSD/DST files
Fixes ticket #10030.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2202dcfc0fbee51e0fe280877fedf07e6762f3a4
---
libavformat/iff.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/libavformat/iff.c b/libavformat/iff.c
index de58b93421..38f90dd81c 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -692,13 +692,15 @@ static int iff_read_header(AVFormatContext *s)
/* DSD tags */
case MKTAG('F','V','E','R'):
- if (data_size < 4)
- return AVERROR_INVALIDDATA;
- version = avio_rb32(pb);
- av_log(s, AV_LOG_DEBUG, "DSIFF v%d.%d.%d.%d\n",version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- if (!new_stream(s, &sta, &iff->audio_stream_index, AVMEDIA_TYPE_AUDIO))
- return AVERROR(ENOMEM);
- sta->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ if (iff->form_tag == ID_DSD || iff->form_tag == ID_DST) {
+ if (data_size < 4)
+ return AVERROR_INVALIDDATA;
+ version = avio_rb32(pb);
+ av_log(s, AV_LOG_DEBUG, "DSIFF v%d.%d.%d.%d\n",version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
+ if (!new_stream(s, &sta, &iff->audio_stream_index, AVMEDIA_TYPE_AUDIO))
+ return AVERROR(ENOMEM);
+ sta->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ }
break;
case MKTAG('D','I','I','N'):
More information about the ffmpeg-cvslog
mailing list