changeset 9032:caee3bed2145 libavcodec

ff_find_hwaccel()
author michael
date Tue, 24 Feb 2009 18:51:16 +0000
parents 62f346579c36
children bcf716c58be4
files utils.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
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;
+}