[XviD-devel] status problem in decode

Christoph Lampert xvid-devel@xvid.org
Sun, 12 Jan 2003 12:35:17 +0100 (CET)


On Sun, 12 Jan 2003, Venkata Tumati wrote:

> Hi,
> For some reason status that is used in 
> Status = dec_init
> Status = dec_main
> Never changes it always remains 0, in encode it changes to 1. When I
> printed the status after line 375 in xvid_decore.c I got a 0 I am using
> it should be a 1 like the way encoder does it.
> 
> What is the reason for this am I doing something wrong. 

I don't know of a file "xvid_decore.c", but if you talk about the examples
in xvidcore/examples

status is used as an error variable. All routines should return 0, this
means "no error". If they return something else, like 1, an error was
detected, e.g. the end of the bitstream is reached in decoding mode. 
However, since there still might be images buffered internally in the
codec, the program doesn't terminate, but continues decoding, possibly
until the maximum number of frames is reached. I don't remember exactly.

Anyway, the programs are just for illustration of the API, you can change
them to fit your needs as you wish...

gruel