[FFmpeg-devel] [PATCH 15/15] vfwcap: Fix some warnings about incompatible pointer type
jamal
jamrial at gmail.com
Fri Jul 27 19:27:05 CEST 2012
On 27/07/12 2:11 PM, Michael Niedermayer wrote:
> On Fri, Jul 27, 2012 at 05:23:25AM -0300, jamal wrote:
>> ---
>> libavdevice/vfwcap.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
>> index d8e32ce..6a4cea0 100644
>> --- a/libavdevice/vfwcap.c
>> +++ b/libavdevice/vfwcap.c
>> @@ -322,7 +322,7 @@ static int vfw_read_header(AVFormatContext *s)
>> }
>>
>> if (ctx->video_size) {
>> - ret = av_parse_video_size(&bi->bmiHeader.biWidth, &bi->bmiHeader.biHeight, ctx->video_size);
>> + ret = av_parse_video_size((int *)&bi->bmiHeader.biWidth, (int *)&bi->bmiHeader.biHeight, ctx->video_size);
>
> what are the types of biWidth and biHeight ?
> if they arent int then the cast is likely wrong
>
They are long, but av_parse_video_size() expects them to be int.
D:/msys/1.0/ffmpeg/src/libavdevice/vfwcap.c: In function 'vfw_read_header':
D:/msys/1.0/ffmpeg/src/libavdevice/vfwcap.c:325:9: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type [enabled by default]
In file included from D:/msys/1.0/ffmpeg/src/libavdevice/vfwcap.c:25:0:
D:/msys/1.0/ffmpeg/src/libavutil/parseutils.h:66:5: note: expected 'int *' but argument is of type 'LONG *'
D:/msys/1.0/ffmpeg/src/libavdevice/vfwcap.c:325:9: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type [enabled by default]
In file included from D:/msys/1.0/ffmpeg/src/libavdevice/vfwcap.c:25:0:
D:/msys/1.0/ffmpeg/src/libavutil/parseutils.h:66:5: note: expected 'int *' but argument is of type 'LONG *'
More information about the ffmpeg-devel
mailing list