diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-02-24 18:51:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-02-24 18:51:16 +0000 |
commit | 6059f13cad4a0a980def65f3c185ce8ee7e7e0b9 (patch) | |
tree | 6b31ed365c66167c64e21ce37b49785fcb4b97a7 /libavcodec | |
parent | 414d9d7f2e6fce2b2c0fe3d072f1bc6b66e5d9ac (diff) | |
download | ffmpeg-6059f13cad4a0a980def65f3c185ce8ee7e7e0b9.tar.gz |
ff_find_hwaccel()
Originally committed as revision 17568 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index cd4cbde374..b6412a5313 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1140,3 +1140,15 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) { 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; +} |