av_register_hwaccel() from Gwenole Beauchesne.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2009 18:46:00 +0000 (18:46 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2009 18:46:00 +0000 (18:46 +0000)
Originally committed as revision 17566 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/utils.c

index f9b9a30..efa92fd 100644 (file)
@@ -1124,3 +1124,14 @@ void ff_log_ask_for_sample(void *avc, const char *msg)
             "of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ "
             "and contact the ffmpeg-devel mailing list.\n");
 }
+
+static AVHWAccel *first_hwaccel = NULL;
+
+void av_register_hwaccel(AVHWAccel *hwaccel)
+{
+    AVHWAccel **p = &first_hwaccel;
+    while (*p)
+        p = &(*p)->next;
+    *p = hwaccel;
+    hwaccel->next = NULL;
+}