From 6ce9b4310cf1eba1a356191f30460a97e6653b91 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Fri, 6 Aug 2010 09:37:04 +0000 Subject: Remove use of the deprecated function avcodec_check_dimensions(), use av_check_image_size() instead. Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavdevice/Makefile | 2 +- libavdevice/avdevice.h | 2 +- libavdevice/v4l.c | 3 ++- libavdevice/v4l2.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'libavdevice') diff --git a/libavdevice/Makefile b/libavdevice/Makefile index be28f4a0ad..1c0630b38c 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -1,7 +1,7 @@ include $(SUBDIR)../config.mak NAME = avdevice -FFLIBS = avformat avcodec avutil +FFLIBS = avformat avcodec avcore avutil HEADERS = avdevice.h diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index b9c0fd7b83..09f366eead 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -23,7 +23,7 @@ #define LIBAVDEVICE_VERSION_MAJOR 52 #define LIBAVDEVICE_VERSION_MINOR 2 -#define LIBAVDEVICE_VERSION_MICRO 0 +#define LIBAVDEVICE_VERSION_MICRO 1 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \ diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c index d0ef7d5e04..50a113a72a 100644 --- a/libavdevice/v4l.c +++ b/libavdevice/v4l.c @@ -22,6 +22,7 @@ #undef __STRICT_ANSI__ //workaround due to broken kernel headers #include "config.h" #include "libavutil/rational.h" +#include "libavcore/imgutils.h" #include "libavformat/avformat.h" #include "libavcodec/dsputil.h" #include @@ -116,7 +117,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) } } - if(avcodec_check_dimensions(s1, s->video_win.width, s->video_win.height) < 0) + if(av_check_image_size(s->video_win.width, s->video_win.height, 0, s1) < 0) return -1; desired_palette = -1; diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index ce88903c3a..c00785f51e 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -43,6 +43,7 @@ #endif #include #include +#include "libavcore/imgutils.h" static const int desired_video_buffers = 256; @@ -623,7 +624,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) return AVERROR(EIO); } - if (avcodec_check_dimensions(s1, s->width, s->height) < 0) + if (av_check_image_size(s->width, s->height, 0, s1) < 0) return AVERROR(EINVAL); s->frame_format = desired_format; -- cgit v1.2.3