aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-11-12 01:25:44 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-11-13 16:21:47 +0100
commitcc085993f42cc01f394c2ce867397179bdf17cca (patch)
tree616f4117da0ad3da970c5415a348b45bd73d0450 /libavcodec/utils.c
parentc1a02e884ac785033baab356a5437adf057a4189 (diff)
downloadffmpeg-cc085993f42cc01f394c2ce867397179bdf17cca.tar.gz
avcodec: remove ff_is_hwaccel_pix_fmt
It is used only in one place and is unlikely it would be needed elsewhere.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 054dc693e9..06f4fc94e4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -628,9 +628,15 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
return 0;
}
+static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
+{
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
+ return desc->flags & PIX_FMT_HWACCEL;
+}
+
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
{
- while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt))
+ while (*fmt != AV_PIX_FMT_NONE && is_hwaccel_pix_fmt(*fmt))
++fmt;
return fmt[0];
}