[MPlayer-users] Bug or feature in spudec.c

Felix Buenemann atmosfear at users.sourceforge.net
Tue Apr 30 21:41:01 CEST 2002


On Monday 29 April 2002 18:01, Arne Driescher wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
>
> Code in question from spudec.c release 0.9pre1:
> #if 1
>   // check if we have a complete packet (unfortunatelly packet_size is bad
>   // for some disks)
> //  if (spu->packet_offset == spu->packet_size)   <------- line in question
>   { unsigned int x=0,y;
>     while(x+4<=spu->packet_offset){
>
> I have "stolen" the spudec source for my own project and have found that
> some subtitles are not decoded as expected.
> To make it work I had to remove the
> comment signs of the line noted above.
> From my point of view the bug is triggered if an incomplete
> packet arrives at this point. Even so the packet is correct but
> still incomplete the check is run and finds that the packet
> data are not consistend (small wonder).
> If nobody can give better arguments I would opt for
> this version:
>
> assert(this->packet_offset <= this->packet_size);   // debug
> #if 1
>   // check if we have a complete packet (unfortunatelly packet_size is bad
>   // for some disks)
> if (spu->packet_offset == spu->packet_size)   <------- line in question
>   { unsigned int x=0,y;
>     while(x+4<=spu->packet_offset){
>
> On my examples I could not trigger the assertion. So, a large scale test on
> pre2 might be a good test.

thx, apllied to cvs.
>
> -Arne
>
-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________




More information about the MPlayer-users mailing list