ff_find_hwaccel()

Originally committed as revision 17568 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2009-02-24 18:51:16 +00:00
parent 414d9d7f2e
commit 6059f13cad

View File

@ -1140,3 +1140,15 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel)
{ {
return hwaccel ? hwaccel->next : first_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;
}