Commit 29f7c292 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Remove an instance of exit(). We should return failure, not kill the

thread, when a bad stream is encountered.
parent 1469cf58
......@@ -84,7 +84,7 @@ int decode_header(struct frame *fr,unsigned long newhead)
fr->lay = 4-((newhead>>17)&3);
if( ((newhead>>10)&0x3) == 0x3) {
fprintf(stderr,"Stream error\n");
exit(1);
return (0);
}
if(fr->mpeg25) {
fr->sampling_frequency = 6 + ((newhead>>10)&0x3);
......
......@@ -175,7 +175,9 @@ int decodeMP3(struct mpstr *mp,char *in,int isize,char *out,
return MP3_NEED_MORE;
}
read_head(mp);
decode_header(&mp->fr,mp->header);
if (decode_header(&mp->fr,mp->header) == 0) {
return MP3_ERR;
}
mp->framesize = mp->fr.framesize;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment