[XviD-devel] xvid_decore return values puzzled me so much

赵宇龙 zylthinking at gmail.com
Wed Nov 7 07:12:44 CET 2007


   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?
and what does that means, how can I deal with that??


More information about the XviD-devel mailing list