mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
mp3dec: recover from PCM write errors without crashing
This commit is contained in:
committed by
Jacek Jendrzej
parent
629dc8562f
commit
cc1dea140a
@@ -768,6 +768,8 @@ q * next mad_frame_decode() invocation. (See the comments marked
|
||||
{
|
||||
fprintf(stderr,"%s: PCM write error in stereo (%s).\n", ProgName, strerror(errno));
|
||||
Status = WRITE_ERR;
|
||||
Synth.pcm.length = 0; /* discard buffer */
|
||||
OutputPtr = OutputBuffer;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -835,6 +837,8 @@ q * next mad_frame_decode() invocation. (See the comments marked
|
||||
{
|
||||
fprintf(stderr,"%s: PCM write error in mono (%s).\n", ProgName, strerror(errno));
|
||||
Status = WRITE_ERR;
|
||||
Synth.pcm.length = 0; /* discard buffer */
|
||||
OutputPtr = OutputBuffer;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user