* src/media/media-internal.c (parsewave): Check the return of
waverequire, because we are trying to align the stream, but it may
still be fatal. Also fix the "flow" through of fatal error parsing
WAVE file in case wvSoundChuck which do not sound proper.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
if (parsestate.wave.chunklength)
parsestate.wave.state =
wvSkipChunk;
- } else if (rq)
+ } else if (rq) {
/* align data length to a multiple of datasize; keep additional data
in "leftover" buffer --- this is necessary to ensure proper
functioning of the sndcnv... routines */
- waverequire(data, sz, rq);
- return (count);
+ if(waverequire(data, sz, rq) != 0)
+ return (count);
+ else
+ return 0;
+ }
}
+ break;
case wvFatalNotify:
warn("Irrecoverable error while parsing WAVE file");
parsestate.wave.state = wvFatal;
- break;
+ return 0;
case wvFatal:
default:
*sz = 0;