Commit 94bed8e5 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by 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: 's avatarDiego Biurrun <diego@biurrun.de>
parent 93d06bd1
...@@ -1171,8 +1171,8 @@ static void do_video_out(AVFormatContext *s, ...@@ -1171,8 +1171,8 @@ static void do_video_out(AVFormatContext *s,
av_log(NULL, AV_LOG_INFO, 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", "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, ist->file_index, ist->st->index,
ost->resample_width, ost->resample_height, avcodec_get_pix_fmt_name(ost->resample_pix_fmt), ost->resample_width, ost->resample_height, av_get_pix_fmt_name(ost->resample_pix_fmt),
dec->width , dec->height , avcodec_get_pix_fmt_name(dec->pix_fmt)); dec->width , dec->height , av_get_pix_fmt_name(dec->pix_fmt));
if(!ost->video_resample) if(!ost->video_resample)
ffmpeg_exit(1); ffmpeg_exit(1);
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
* DV codec. * DV codec.
*/ */
#define ALT_BITSTREAM_READER #define ALT_BITSTREAM_READER
#include "libavutil/pixdesc.h"
#include "avcodec.h" #include "avcodec.h"
#include "dsputil.h" #include "dsputil.h"
#include "get_bits.h" #include "get_bits.h"
...@@ -350,7 +351,7 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx) ...@@ -350,7 +351,7 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
{ {
if (!ff_dv_codec_profile(avctx)) { if (!ff_dv_codec_profile(avctx)) {
av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n", 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; return -1;
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h" #include "avcodec.h"
#include "rle.h" #include "rle.h"
#include "targa.h" #include "targa.h"
...@@ -119,7 +120,7 @@ static int targa_encode_frame(AVCodecContext *avctx, ...@@ -119,7 +120,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
break; break;
default: default:
av_log(avctx, AV_LOG_ERROR, "Pixel format '%s' not supported.\n", 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); return AVERROR(EINVAL);
} }
bpp = outbuf[16] >> 3; bpp = outbuf[16] >> 3;
......
...@@ -933,7 +933,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) ...@@ -933,7 +933,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (enc->pix_fmt != PIX_FMT_NONE) { if (enc->pix_fmt != PIX_FMT_NONE) {
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %s", ", %s",
avcodec_get_pix_fmt_name(enc->pix_fmt)); av_get_pix_fmt_name(enc->pix_fmt));
} }
if (enc->width) { if (enc->width) {
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
......
...@@ -162,7 +162,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap, ...@@ -162,7 +162,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap,
break; break;
if (!fps->frame_rate || !fmt->width) { 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); width, height, dc1394->frame_rate);
ret = AVERROR(EINVAL); ret = AVERROR(EINVAL);
goto out; goto out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment