hwaccel: Simplify ff_find_hwaccel

It is always called by passing fields from an AVCodecContext.
This commit is contained in:
Luca Barbato
2013-11-09 17:07:34 +01:00
parent d42db44cfe
commit 08303d7741
6 changed files with 11 additions and 9 deletions

View File

@@ -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)))