[XviD-devel] xvid_decore return values puzzled me so much
pascal.massimino@free.fr
pascal.massimino at free.fr
Sat Nov 10 18:39:05 CET 2007
Quoting ÕÔÓîÁú <zylthinking at gmail.com>:
> for times, the return value of xvid_decore puzzled me so much, for
> instance:
>
> xvid_dec_frame_t xvid_dec_frame = {0};
> xvid_dec_frame.version = XVID_VERSION;
> xvid_dec_frame.general = 0;
> xvid_dec_frame.output.plane[0] = out;
> xvid_dec_frame.output.stride[0] = 2 * width;
> xvid_dec_frame.output.csp = XVID_CSP_YUY2;
>
> xvid_dec_stats_t xvid_dec_status = {0};
> xvid_dec_status.version = XVID_VERSION;
>
> xvid_dec_frame.bitstream = buffer;
> xvid_dec_frame.length = len;
> int consumed = xvid_decore(handle, XVID_DEC_DECODE, &xvid_dec_frame,
> &xvid_dec_status);
>
> to my surprise, consumed is larger than xvid_dec_frame.length, how can this
> happen?
my guess: the bitstream is invalid, truncated, corrupted...
> and what does that means, how can I deal with that??
skal
More information about the XviD-devel
mailing list