From 718c7b18c91c3eca21d7028bc6581045b22b32a4 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 30 Jan 2010 19:10:26 +0000 Subject: [PATCH] Use av_get_pix_fmt() instead of the deprecated avcodec_get_pix_fmt() function. Originally committed as revision 21550 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 3 ++- ffplay.c | 3 ++- libavfilter/vf_format.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index e82194f311..9f19b06e5d 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -38,6 +38,7 @@ #include "libavcodec/audioconvert.h" #include "libavcodec/colorspace.h" #include "libavutil/fifo.h" +#include "libavutil/pixdesc.h" #include "libavutil/avstring.h" #include "libavformat/os_support.h" @@ -2581,7 +2582,7 @@ static void opt_frame_pad_right(const char *arg) static void opt_frame_pix_fmt(const char *arg) { if (strcmp(arg, "list")) { - frame_pix_fmt = avcodec_get_pix_fmt(arg); + frame_pix_fmt = av_get_pix_fmt(arg); if (frame_pix_fmt == PIX_FMT_NONE) { fprintf(stderr, "Unknown pixel format requested: %s\n", arg); av_exit(1); diff --git a/ffplay.c b/ffplay.c index ffbd42da21..f86aaf184b 100644 --- a/ffplay.c +++ b/ffplay.c @@ -23,6 +23,7 @@ #include #include #include "libavutil/avstring.h" +#include "libavutil/pixdesc.h" #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" @@ -2406,7 +2407,7 @@ static void opt_format(const char *arg) static void opt_frame_pix_fmt(const char *arg) { - frame_pix_fmt = avcodec_get_pix_fmt(arg); + frame_pix_fmt = av_get_pix_fmt(arg); } static int opt_sync(const char *opt, const char *arg) diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 66c569cb53..d9f102db7c 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -23,6 +23,7 @@ * format and noformat video filters */ +#include "libavutil/pixdesc.h" #include "avfilter.h" typedef struct { @@ -56,7 +57,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) memcpy(pix_fmt_name, cur, pix_fmt_name_len); pix_fmt_name[pix_fmt_name_len] = 0; - pix_fmt = avcodec_get_pix_fmt(pix_fmt_name); + pix_fmt = av_get_pix_fmt(pix_fmt_name); if (pix_fmt == PIX_FMT_NONE) { av_log(ctx, AV_LOG_ERROR, "Unknown pixel format: %s\n", pix_fmt_name);