//include swscale
#include "libswscale/swscale.h"

//function for convert from yuv to bitmap
char* yuv2rgb()
{
    *static SwsContext *sws_context = NULL;*

    sws_context = sws_getCachedContext(sws_context, width, height,
pCodecCtx->pix_fmt, width, height, PIX_FMT_BGR24, 0, NULL, NULL, NULL);
    if (!sws_context)
        printf("ffmpeg-conversion failed (%d->%d)", pCodecCtx->pix_fmt,
PIX_FMT_BGR24);
    else if (sws_scale(sws_context, picture->data, picture->linesize, 0,
height, frame_RGB->data, frame_RGB->linesize)<0)
        printf("ffmpeg-conversion failed (%d->%d)", pCodecCtx->pix_fmt,
PIX_FMT_BGR24);

    return (char*)frame_RGB->data[0];
}

On the line in bold I have this error: decoder.c:24: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
I search in google but i don't find any solution. I'm stopped on this error.
What's the cause of is error? Anyone know a possible solution?
Thanks in advance.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to