[FFmpeg-cvslog] Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().

Stefano Sabatini git at videolan.org
Sat Jun 4 06:39:59 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Fri Jun  3 11:42:07 2011 +0200| [94bed8e582eed1268ddc0d2b88cad21d8c638774] | committer: Diego Biurrun

Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().

This fixes warnings about avcodec_get_pix_fmt_name() being deprecated.
Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94bed8e582eed1268ddc0d2b88cad21d8c638774
---

 ffmpeg.c                |    4 ++--
 libavcodec/dv.c         |    3 ++-
 libavcodec/targaenc.c   |    3 ++-
 libavcodec/utils.c      |    2 +-
 libavdevice/libdc1394.c |    2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 15ac03e..1c4c4b1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1171,8 +1171,8 @@ static void do_video_out(AVFormatContext *s,
         av_log(NULL, AV_LOG_INFO,
                "Input stream #%d.%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n",
                ist->file_index, ist->st->index,
-               ost->resample_width, ost->resample_height, avcodec_get_pix_fmt_name(ost->resample_pix_fmt),
-               dec->width         , dec->height         , avcodec_get_pix_fmt_name(dec->pix_fmt));
+               ost->resample_width, ost->resample_height, av_get_pix_fmt_name(ost->resample_pix_fmt),
+               dec->width         , dec->height         , av_get_pix_fmt_name(dec->pix_fmt));
         if(!ost->video_resample)
             ffmpeg_exit(1);
     }
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 4ee4e5e..cd682ec 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -38,6 +38,7 @@
  * DV codec.
  */
 #define ALT_BITSTREAM_READER
+#include "libavutil/pixdesc.h"
 #include "avcodec.h"
 #include "dsputil.h"
 #include "get_bits.h"
@@ -350,7 +351,7 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
 {
     if (!ff_dv_codec_profile(avctx)) {
         av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n",
-               avctx->width, avctx->height, avcodec_get_pix_fmt_name(avctx->pix_fmt));
+               avctx->width, avctx->height, av_get_pix_fmt_name(avctx->pix_fmt));
         return -1;
     }
 
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index 828ab11..276bcc8 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/pixdesc.h"
 #include "avcodec.h"
 #include "rle.h"
 #include "targa.h"
@@ -119,7 +120,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
         break;
     default:
         av_log(avctx, AV_LOG_ERROR, "Pixel format '%s' not supported.\n",
-               avcodec_get_pix_fmt_name(avctx->pix_fmt));
+               av_get_pix_fmt_name(avctx->pix_fmt));
         return AVERROR(EINVAL);
     }
     bpp = outbuf[16] >> 3;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0eb5afd..65792a6 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -933,7 +933,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
         if (enc->pix_fmt != PIX_FMT_NONE) {
             snprintf(buf + strlen(buf), buf_size - strlen(buf),
                      ", %s",
-                     avcodec_get_pix_fmt_name(enc->pix_fmt));
+                     av_get_pix_fmt_name(enc->pix_fmt));
         }
         if (enc->width) {
             snprintf(buf + strlen(buf), buf_size - strlen(buf),
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 2811e3b..b17d0fb 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -162,7 +162,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap,
              break;
 
     if (!fps->frame_rate || !fmt->width) {
-        av_log(c, AV_LOG_ERROR, "Can't find matching camera format for %s, %dx%d@%d:1000fps\n", avcodec_get_pix_fmt_name(pix_fmt),
+        av_log(c, AV_LOG_ERROR, "Can't find matching camera format for %s, %dx%d@%d:1000fps\n", av_get_pix_fmt_name(pix_fmt),
                                                                                                 width, height, dc1394->frame_rate);
         ret = AVERROR(EINVAL);
         goto out;



More information about the ffmpeg-cvslog mailing list