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:
Ozkan Sezer 2019-12-12 14:01:02 +00:00
parent ffe43cf024
commit 386e56258d

View file

@ -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)
{