fprintf(stderr, "get_buffer() failed\n");
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
static int decode_frame(AVCodecContext *avctx,                         void *data, int *data_size,                        uint8_t *buf, int buf_size){    CLJRContext * const a = avctx->priv_data;    AVFrame *picture = data;    AVFrame * const p= (AVFrame*)&a->picture;    int x, y;    *data_size = 0;    /* special case for last picture */    if (buf_size == 0) {        return 0;    }    if(p->data[0])        avctx->release_buffer(avctx, p);    p->reference= 0;    if(avctx->get_buffer(avctx, p) < 0){        fprintf(stderr, "get_buffer() failed\n");        return -1;    }    p->pict_type= I_TYPE;    p->key_frame= 1;    init_get_bits(&a->gb, buf, buf_size);    for(y=0; y<avctx->height; y++){        uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];        uint8_t *cb= &a->picture.data[1][ y*a->picture.linesize[1] ];        uint8_t *cr= &a->picture.data[2][ y*a->picture.linesize[2] ];        for(x=0; x<avctx->width; x+=4){    	    luma[3] = get_bits(&a->gb, 5) << 3;	    luma[2] = get_bits(&a->gb, 5) << 3;	    luma[1] = get_bits(&a->gb, 5) << 3;	    luma[0] = get_bits(&a->gb, 5) << 3;	    luma+= 4;	    *(cb++) = get_bits(&a->gb, 6) << 2;	    *(cr++) = get_bits(&a->gb, 6) << 2;        }    }    *picture= *(AVFrame*)&a->picture;    *data_size = sizeof(AVPicture);    emms_c();        return buf_size;}