# HG changeset patch # User michael # Date 1235501476 0 # Node ID caee3bed2145afc8cfd5268464a1b6b8ebf214c0 # Parent 62f346579c360d38cfdfe986e57697ebb29c4612 ff_find_hwaccel() diff -r 62f346579c36 -r caee3bed2145 utils.c --- 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; +}