avvidenc: also skip non-video encoders
authorTim-Philipp Müller <tim@centricular.net>
Sun, 30 Sep 2012 15:25:29 +0000 (16:25 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 30 Sep 2012 15:25:29 +0000 (16:25 +0100)
Doesn't actually make any difference at the moment, but
seems the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=685113

ext/libav/gstavvidenc.c

index 2ef4acb..b747613 100644 (file)
@@ -970,10 +970,9 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
       goto next;
     }
 
-    /* only encoders */
-    if (!in_plugin->encode) {
+    /* only video encoders */
+    if (!in_plugin->encode || in_plugin->type != AVMEDIA_TYPE_VIDEO)
       goto next;
-    }
 
     /* FIXME : We should have a method to know cheaply whether we have a mapping
      * for the given plugin or not */