[FFmpeg-devel] [PATCH 1/3] Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Michael Niedermayer
michaelni at gmx.at
Sat Oct 20 01:54:46 CEST 2012
On Fri, Oct 19, 2012 at 09:35:38PM +0200, Hendrik Leppkes wrote:
> ---
> ffmpeg_filter.c | 6 +++---
> libavcodec/libstagefright.cpp | 2 +-
> libavfilter/avfiltergraph.c | 2 +-
> libavfilter/vf_colormatrix.c | 2 +-
> libavfilter/vf_decimate.c | 2 +-
> libavfilter/vf_deshake.c | 4 ++--
> libavfilter/vf_hflip.c | 2 +-
> libavfilter/vf_hue.c | 2 +-
> libavfilter/vf_idet.c | 2 +-
> libavfilter/vf_overlay.c | 2 +-
> libavfilter/vf_smartblur.c | 2 +-
> libavfilter/vf_tinterlace.c | 4 ++--
> libavfilter/video.c | 2 +-
> libavfilter/vsrc_mptestsrc.c | 2 +-
> libswscale/swscale_internal.h | 4 ++--
> libswscale/x86/swscale.c | 2 +-
> tools/fourcc2pixfmt.c | 2 +-
> 17 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> index 5f9c42c..d3569d9 100644
> --- a/ffmpeg_filter.c
> +++ b/ffmpeg_filter.c
> @@ -37,7 +37,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
> {
> if (codec && codec->pix_fmts) {
> const enum AVPixelFormat *p = codec->pix_fmts;
> - int has_alpha= av_pix_fmt_descriptors[target].nb_components % 2 == 0;
> + int has_alpha= av_pix_fmt_desc_get(target)->nb_components % 2 == 0;
> enum AVPixelFormat best= AV_PIX_FMT_NONE;
> if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
> if (st->codec->codec_id == AV_CODEC_ID_MJPEG) {
> @@ -56,9 +56,9 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
> if (target != AV_PIX_FMT_NONE)
> av_log(NULL, AV_LOG_WARNING,
> "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
> - av_pix_fmt_descriptors[target].name,
> + av_pix_fmt_desc_get(target)->name,
> codec->name,
> - av_pix_fmt_descriptors[best].name);
> + av_pix_fmt_desc_get(best)->name);
av_get_pix_fmt_name()
also has the advantage of not crashing on invalid pixel formats.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121020/5aa25f61/attachment.asc>
More information about the ffmpeg-devel
mailing list