[MPlayer-dev-eng] [PATCH] tremor: v3.0 some workaround for
Arpi
arpi at thot.banki.hu
Wed Jan 29 00:45:20 CET 2003
Hi,
ok it looks okey
could anyone test with different bitrate/etc ogm and ogg files?
both tremor and libvorbis
> So this is hopefully my last attempt.
> tremor seems to need a little rest, otherwise it will
> never give back samples>0 ...
>
> bye
> Denes
>
>
> On 2003. január 28. 23:56, Arpi wrote:
> > Hi,
> >
> > > 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;
> > >
> > > ?
> >
> > why?
> >
> > while((samples=vorbis_synthesis_pcmout(&ov->vd,&pcm))<=0){
> > }
> >
> > just do the same
> >
> >
> > A'rpi / Astral & ESP-team
>
>
> diff -Naur main/libmpcodecs/ad_libvorbis.c main.gany/libmpcodecs/ad_libvorbis.c
> --- main/libmpcodecs/ad_libvorbis.c 2003-01-18 22:38:57.000000000 +0100
> +++ main.gany/libmpcodecs/ad_libvorbis.c 2003-01-29 00:22:06.000000000 +0100
> @@ -192,18 +192,24 @@
> struct ov_struct_st *ov = sh->context;
> op.b_o_s = op.e_o_s = 0;
> while(len < minlen) {
> - op.bytes = ds_get_packet(sh->ds,&op.packet);
> - if(!op.packet)
> - break;
> - if(vorbis_synthesis(&ov->vb,&op)==0) /* test for success! */
> - vorbis_synthesis_blockin(&ov->vd,&ov->vb);
> - while((samples=vorbis_synthesis_pcmout(&ov->vd,&pcm))>0){
> +#ifdef TREMOR
> + if((samples=vorbis_synthesis_pcmout(&ov->vd,&pcm))<=0) {
> +#else
> + while((samples=vorbis_synthesis_pcmout(&ov->vd,&pcm))<=0) {
> +#endif
> + 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);
> + }
> + if(samples<=0) break; // error/EOF/tremor
> + while(samples>0){
> int i,j;
> int clipflag=0;
> int convsize=(maxlen-len)/(2*ov->vi.channels); // max size!
> - int bout=(samples<convsize?samples:convsize);
> + int bout=((samples<convsize)?samples:convsize);
>
> - if(bout<=0) break;
> + if(bout<=0) break; // no buffer space
>
> /* convert floats to 16 bit signed ints (host order) and
> interleave */
> @@ -265,10 +271,12 @@
> mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"Clipping in frame %ld\n",(long)(ov->vd.sequence));
> len+=2*ov->vi.channels*bout;
> mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"\n[decoded: %d / %d ]\n",bout,samples);
> + samples-=bout;
> vorbis_synthesis_read(&ov->vd,bout); /* tell libvorbis how
> many samples we
> actually consumed */
> - }
> + } //while(samples>0)
> +// if (!samples) break; // why? how?
> }
>
>
>
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
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