if( rv10_decode_packet(avctx, buf, buf_size) < 0 ) return -1;
rv10_decode_packet(avctx, buf, buf_size);
static int rv10_decode_frame(AVCodecContext *avctx,                              void *data, int *data_size,                             uint8_t *buf, int buf_size){    MpegEncContext *s = avctx->priv_data;    int i;    AVFrame *pict = data; #ifdef DEBUG    printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);#endif    /* no supplementary picture */    if (buf_size == 0) {        return 0;    }    if(avctx->slice_count){        for(i=0; i<avctx->slice_count; i++){            int offset= avctx->slice_offset[i];            int size;                        if(i+1 == avctx->slice_count)                size= buf_size - offset;            else                size= avctx->slice_offset[i+1] - offset;            if( rv10_decode_packet(avctx, buf+offset, size) < 0 )                return -1;        }    }else{        if( rv10_decode_packet(avctx, buf, buf_size) < 0 )            return -1;    }        if(s->mb_y>=s->mb_height){        MPV_frame_end(s);            if(s->pict_type==B_TYPE || s->low_delay){            *pict= *(AVFrame*)&s->current_picture;            ff_print_debug_info(s, pict);        } else {            *pict= *(AVFrame*)&s->last_picture;            ff_print_debug_info(s, pict);        }        if(s->last_picture_ptr || s->low_delay)            *data_size = sizeof(AVFrame);    }    return buf_size;}