diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-11-09 17:07:34 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-11-10 13:59:48 +0100 |
commit | 08303d774132775d49d4ba767092de5d426f089d (patch) | |
tree | 09339c4a5d2ddd495a75a7d6eea1b101066b2069 /libavcodec/utils.c | |
parent | d42db44cfe58493eb26d2d2f307ced4dd4ca1978 (diff) | |
download | ffmpeg-08303d774132775d49d4ba767092de5d426f089d.tar.gz |
hwaccel: Simplify ff_find_hwaccel
It is always called by passing fields from an AVCodecContext.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index da519b5eb6..2f5c170c69 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2137,8 +2137,11 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) return hwaccel ? hwaccel->next : first_hwaccel; } -AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt) +AVHWAccel *ff_find_hwaccel(AVCodecContext *avctx) { + enum AVCodecID codec_id = avctx->codec->id; + enum AVPixelFormat pix_fmt = avctx->pix_fmt; + AVHWAccel *hwaccel = NULL; while ((hwaccel = av_hwaccel_next(hwaccel))) |