[XviD-devel] Fw: Fw: libxvidcore decompression

Stephan Assmus superstippi at gmx.de
Thu Apr 24 15:09:38 CEST 2008


reno reballos wrote:
> isn't that i have to call XVID_GBL_INIT, XVID_DEC_CREATE and 
> XVID_DEC_DECODE every time i decode or i have to call XVID_GBL_INIT, 
> XVID_DEC_CREATE once and  XVID_DEC_DECODE whenever i have frame to decode 
> and XVID_DEC_DESTROY when i do finish the decode, right now in my 
> application i call XVID_GBL_INIT, XVID_DEC_CREATE and XVID_DEC_DECODE 
> whenever i decode a frame..

It definitely sounds like that would be the possible cause of your problem. 
You only init/dec create once. Then you need to remember the 
pointers/structures that are returned/initialized by that, and use those 
for XVID_DEC_DECODE. To know when a frame has been successfully decoded, 
you need to check for the "type" field of the xvid_dec_stats_t structure 
each time after you called decode. It has to be > XVID_TYPE_NOTHING, then 
you can display a finished frame.

Best regards,
-Stephan


More information about the XviD-devel mailing list