Mercurial > libavcodec.hg
diff utils.c @ 9032:caee3bed2145 libavcodec
ff_find_hwaccel()
author | michael |
---|---|
date | Tue, 24 Feb 2009 18:51:16 +0000 |
parents | 62f346579c36 |
children | 6faca73d75cc |
line wrap: on
line diff
--- a/utils.c Tue Feb 24 18:47:36 2009 +0000 +++ b/utils.c Tue Feb 24 18:51:16 2009 +0000 @@ -1140,3 +1140,15 @@ { return hwaccel ? hwaccel->next : first_hwaccel; } + +AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt) +{ + AVHWAccel *hwaccel=NULL; + + while((hwaccel= av_hwaccel_next(hwaccel))){ + if ( hwaccel->id == codec_id + && hwaccel->pix_fmt == pix_fmt) + return hwaccel; + } + return NULL; +}