[MPlayer-dev-eng] [PATCH] tremor: v2.0 some workaround for something

Arpi arpi at thot.banki.hu
Tue Jan 28 23:28:20 CET 2003


Hi,

> 
> Thanks I tried it, the same problem with tremor.
> I changed iirc 2 lines (attached as patch against current cvs) , and now 
> tremor works, and normal libvorbis too - however less than minlength samples
> are returned to dec_audio sometimes. I don't know why
> break works and continue does not in the patch (there is a comment).

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);
+         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

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    "However, many people beg for its inclusion in Debian. Why?" - Gabucino
  "Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino


More information about the MPlayer-dev-eng mailing list