Support MP3 audiostreams embedded in ASF containers.

Full credit to Igor Poretsky

Change-Id: I54769e33665cada1e1e0ef3a5511b56c8e1b859a
This commit is contained in:
Solomon Peachy 2018-12-22 20:18:06 -05:00
parent 13c7f482ce
commit 670812a44a
5 changed files with 151 additions and 22 deletions

View file

@ -375,6 +375,11 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
lseek(fd,current.size - 24 - 72 - wfx->datalen,SEEK_CUR);
wfx->audiostream = flags&0x7f;
id3->codectype = AFMT_WMAVOICE;
} else if (wfx->codec_id == ASF_CODEC_ID_MP3) {
lseek(fd,current.size - 24 - 72,SEEK_CUR);
wfx->audiostream = flags&0x7f;
id3->codectype = AFMT_MPA_L3;
id3->is_asf_stream = true;
} else {
DEBUGF("Unsupported WMA codec (Lossless, Voice, etc)\n");
lseek(fd,current.size - 24 - 72,SEEK_CUR);