History

avformat/iff: ignore FVER tag when not processing DSD/DST files

Fixes ticket #10030.

Peter Ross committed 1 year ago

Commit 2202dcf1 parent ba22d6a1 file · +9 −7Browse files

Unified · Split

libavformat/iff.c+9−7
@@ -692,13 +692,15 @@ static int iff_read_header(AVFormatContext *s) · 691 unmodified lines
692692 /* DSD tags */
693693
694694 case MKTAG('F','V','E','R'):
695− if (data_size < 4)
696− return AVERROR_INVALIDDATA;
697− version = avio_rb32(pb);
698− av_log(s, AV_LOG_DEBUG, "DSIFF v%d.%d.%d.%d\n",version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
699− if (!new_stream(s, &sta, &iff->audio_stream_index, AVMEDIA_TYPE_AUDIO))
700− return AVERROR(ENOMEM);
701− sta->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
695+ if (iff->form_tag == ID_DSD || iff->form_tag == ID_DST) {
696+ if (data_size < 4)
697+ return AVERROR_INVALIDDATA;
698+ version = avio_rb32(pb);
699+ av_log(s, AV_LOG_DEBUG, "DSIFF v%d.%d.%d.%d\n",version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
700+ if (!new_stream(s, &sta, &iff->audio_stream_index, AVMEDIA_TYPE_AUDIO))
701+ return AVERROR(ENOMEM);
702+ sta->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
703+ }
702704 break;
703705
704706 case MKTAG('D','I','I','N'):

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t