- if(!getSamples(i->video, block1, 576*4, speedup)) { /* 4 = 44100/11025 */
- i->video->rate = i->video->channels = 0; //end of soundtrack
- return;
+ if(!getSamples(i->video, block1, blocksize * (double)swf_mp3_in_samplerate/swf_mp3_out_samplerate, speedup)) {
+ i->audio_eof = 1; i->video->samplerate = i->video->channels = 0; //end of soundtrack
+ /* fall through, this probably was a partial read. (We did, after all,
+ come to this point, so i->audio_eof must have been false so far) */