All, I have a chunk of code that creates an AVPicture from a raw stream of YUV420P, and rescales it. Easy-peasy, but I'm getting the error:
zc_libav.c:29: error: passing argument 2 of ‘sws_scale’ from incompatible
pointer type
(I run -pedantic-errors when building test builds.)
Looking at libswscale/swscale.h, I see that the function signature is:
int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
const int srcStride[], int srcSliceY, int srcSliceH,
uint8_t* const dst[], const int dstStride[]);
My code (assume that in_pic and out_pic are properly generated AVPictures):
sws_scale(sws_ctx,
in_pic->data,
in_pic->linesize,
0,
in->y,
out_pic->data,
out_pic->linesize);
I'm happy to cast that 'in_pic->data' to get the compiler to shut up, but I
don't know how. If I turn off errors (-pedantic), it compiles and runs fine.
So this is really about my neurotic need not to see warnings, I guess. But I'm
still curious as to how someone with more C experience would handle this. Am I
doomed to special-casing this makefile rule to turn off -pedantic-errors? That
would make me sad, but then again, there is much that makes me sad.
TIA,
~ jfb
--
James Felix Black <[email protected]>
"Some strangey that!"
Words: http://homonculus.net
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
