[MPlayer-dev-eng] [PATCH] tremor: v2.0 some workaround for something
Balatoni Denes
pnis at coder.hu
Tue Jan 28 23:27:37 CET 2003
So
> ehh
>
> - while((samples=vorbis_synthesis_pcmout(&ov->vd,&pcm))<=0){
> - op.bytes = ds_get_packet(sh->ds,&op.packet);
> - if(op.bytes<=0) break;
> - if(vorbis_synthesis(&ov->vb,&op)==0) /* test for success! */
> - vorbis_synthesis_blockin(&ov->vd,&ov->vb);
Here should come first something like
+ if (vorbis_synthesis_pcmout(&ov->vd,&pcm)>0) break;
?
> + op.bytes = ds_get_packet(sh->ds,&op.packet);
> + if(op.bytes<=0) break;
> + if(vorbis_synthesis(&ov->vb,&op)==0) {/* test for success! */
> + vorbis_synthesis_blockin(&ov->vd,&ov->vb);
> + samples=vorbis_synthesis_pcmout(&ov->vd,&pcm);
> }
>
> you just removed the main point (goal) of my patch:
> get_packet & decompress shouldn't be called unless the buffer is empty.
> otherwise it _may_ (depending on ogg packetsize, compression ratio, maxlen)
> buffer up too many PCM samples and cause a-v desync (and/or drop samples).
>
> A'rpi / Astral & ESP-team
More information about the MPlayer-dev-eng
mailing list