Opened 4 years ago

Closed 3 years ago

#8540 closed defect (fixed)

wavdec failure when wav contains id3 tag with image

Reported by: Adion Owned by:
Priority: important Component: avformat
Version: git-master Keywords: wav id3 regression
Cc: adionc@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

The wav format decoder has a hard-coded assumption that there is 1 audio stream at index 0 and optionally one video stream at index 1.

When wav_read_header encounters an ID3 tag, it will call ff_id3v2_parse_apic which creates a new stream for the attached picture.
If the ID3 tag comes before the fmt tag, the audio tag will therefore end up at index 1 instead of index 0.

wav_read_packet on the other hand will mark all packets as belonging to index 0, thus you may end up never finding a packet to feed to the audio codec.

The easiest fix is probably to re-order the streams in read_header to ensure the assumptions hold up.

Attachments (1)

01 Esto Es Vida_cut.wav (2.4 MB ) - added by Carl Eugen Hoyos 4 years ago.

Change History (6)

comment:1 by Adion, 4 years ago

Cc: adionc@gmail.com added

comment:2 by Carl Eugen Hoyos, 4 years ago

Please provide a sample file.

comment:4 by Carl Eugen Hoyos, 4 years ago

Keywords: regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

Regression since f5aad350d3695b5b16e7d135154a4c61e4dce9d8, related to ticket #5700.

by Carl Eugen Hoyos, 4 years ago

Attachment: 01 Esto Es Vida_cut.wav added

comment:5 by mkver, 3 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.