[Theora] problem with theora files inside container

Ralph Giles giles at xiph.org
Tue Aug 16 15:13:22 PDT 2005


On Tue, Aug 16, 2005 at 10:48:33PM +0200, David Kment wrote:

> i added those 2 lines to buffer_data() in the splayer code:
> totalBytesRead += bytes; // new global variable
> if(totalBytesRead >= myVirtualFilesSize) {bytes = 0;}

You should also trim the number of bytes you try to read (always 4096 in 
the current implementation) at the end of the file. e.g. to 

  MAX(myVirtualFileSize - totalBytesRead, 4096)

to avoid passing unrelated data on the last read.

Glad you got it working,
 -r


More information about the Theora mailing list