problem with parameters of swscale method

This is a discussion on problem with parameters of swscale method within the C Programming forums, part of the General Programming Boards category; /home/ece/workspace/FFmpeg/jni/takepics.c: In function 'fill_image': /home/ece/workspace/FFmpeg/jni/takepics.c:323: warning: passing argument 2 of 'sws_scale' from incompatible pointer type /home/ece/workspace/FFmpeg/jni/ffmpeg/libswscale/swscale.h:195: note: expected 'const uint8_t ...

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    1

    problem with parameters of swscale method

    /home/ece/workspace/FFmpeg/jni/takepics.c: In function 'fill_image':
    /home/ece/workspace/FFmpeg/jni/takepics.c:323: warning: passing argument 2 of 'sws_scale' from incompatible pointer type
    /home/ece/workspace/FFmpeg/jni/ffmpeg/libswscale/swscale.h:195: note: expected 'const uint8_t * const*' but argument is of type 'uint8_t **'
    /home/ece/workspace/FFmpeg/jni/takepics.c: In function 'Java_com_test_Test_takePics':
    /home/ece/workspace/FFmpeg/jni/takepics.c:634: warning: passing argument 2 of 'sws_scale' from incompatible pointer type
    /home/ece/workspace/FFmpeg/jni/ffmpeg/libswscale/swscale.h:195: note: expected 'const uint8_t * const*' but argument is of type 'uint8_t **'
    SharedLibrary : libtakepics.so
    Install : libtakepics.so => /home/ece/workspace/FFmpeg/libs/armeabi

    How can I fix that swscale warnings? Does anyone know anything about it?

    Here is the types of sws_scale's parameters
    int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t* const dst[], const int dstStride[])

    Here is my sws_scale in my code:

    static struct SwsContext *img_convert_ctx;
    AVFrame *pFrame;
    AVCodecContext *pCodecCtx;
    AVFrame *pFrameRGB;

    sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
    Last edited by cervello; 02-09-2011 at 01:02 PM.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,444
    I'm guessing you didn't read the forum guidelines or the post entitled read this first. Please do so, then fix your post to use code tags and proper indentation so people can actually read it. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Packet Container Class
    By ChaoticXSinZ in forum C++ Programming
    Replies: 2
    Last Post: 11-01-2010, 12:07 AM
  2. problem in pass a variable to a class
    By nima_pw in forum C# Programming
    Replies: 3
    Last Post: 06-09-2009, 07:30 AM
  3. Which is the best method for this problem??
    By kahwei in forum C Programming
    Replies: 12
    Last Post: 02-07-2009, 10:15 AM
  4. Insertion Sort Problem
    By silicon in forum C++ Programming
    Replies: 1
    Last Post: 05-08-2005, 12:30 PM
  5. Student Having Problem With Reference Parameters
    By verd in forum C Programming
    Replies: 1
    Last Post: 04-19-2005, 11:19 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21