]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/alldevices.c
kmsgrab: add category for kmsgrab
[ffmpeg] / libavdevice / alldevices.c
index 8b58aa19e5d6b7a9c1f937a4ec6ece9462e9a50a..39993354bc4285b341c697e6cebc4664e22bab98 100644 (file)
@@ -29,6 +29,7 @@
 /* devices */
 extern AVInputFormat  ff_alsa_demuxer;
 extern AVOutputFormat ff_alsa_muxer;
+extern AVInputFormat  ff_android_camera_demuxer;
 extern AVInputFormat  ff_avfoundation_demuxer;
 extern AVInputFormat  ff_bktr_demuxer;
 extern AVOutputFormat ff_caca_muxer;
@@ -125,16 +126,13 @@ static void *device_next(void *prev, int output,
 
     ff_thread_once(&av_device_next_init, av_device_init_next);
 
-    if (!prev && !(prev = (output ? (void*)outdev_list[0] : (void*)indev_list[0])))
-        return NULL;
-
     do {
         if (output) {
-            if (!(prev = ((AVOutputFormat *)prev)->next))
+            if (!(prev = prev ? ((AVOutputFormat *)prev)->next : (void*)outdev_list[0]))
                 break;
             pc = ((AVOutputFormat *)prev)->priv_class;
         } else {
-            if (!(prev = ((AVInputFormat *)prev)->next))
+            if (!(prev = prev ? ((AVInputFormat *)prev)->next : (void*)indev_list[0]))
                 break;
             pc = ((AVInputFormat *)prev)->priv_class;
         }