mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
snd_mp3.c: move skiptags() call to codecopen(), print error if it fails.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1659 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
ffe43cf024
commit
386e56258d
1 changed files with 6 additions and 3 deletions
|
@ -100,9 +100,6 @@ static int mp3_startread(snd_stream_t *stream)
|
|||
mp3_priv_t *p = (mp3_priv_t *) stream->priv;
|
||||
size_t ReadSize;
|
||||
|
||||
if (mp3_skiptags(stream) < 0)
|
||||
return -1;
|
||||
|
||||
mad_stream_init(&p->Stream);
|
||||
mad_frame_init(&p->Frame);
|
||||
mad_synth_init(&p->Synth);
|
||||
|
@ -392,6 +389,12 @@ static qboolean S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||
{
|
||||
int err;
|
||||
|
||||
if (mp3_skiptags(stream) < 0)
|
||||
{
|
||||
Con_Printf("Corrupt mp3 file (bad tags.)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
stream->priv = calloc(1, sizeof(mp3_priv_t));
|
||||
if (!stream->priv)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue