if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)) return -1;
int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,                          int *got_picture_ptr,                         uint8_t *buf, int buf_size){    int ret;        *got_picture_ptr= 0;    ret = avctx->codec->decode(avctx, picture, got_picture_ptr,                                buf, buf_size);    emms_c(); //needed to avoid a emms_c() call before every return;        if (*got_picture_ptr)                                   avctx->frame_number++;    return ret;}