[vlc-devel] [PATCH] image: defer to avformat for BMP

Tristan Matthews tmatth at videolan.org
Fri Nov 13 15:50:35 CET 2015


"Fixes" broken BMP demuxing.
---
 modules/demux/image.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules/demux/image.c b/modules/demux/image.c
index 43c4847..0ffa11a 100644
--- a/modules/demux/image.c
+++ b/modules/demux/image.c
@@ -33,6 +33,7 @@
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
 #include <vlc_image.h>
+#include <vlc_modules.h>
 #include "mxpeg_helper.h"
 
 /*****************************************************************************
@@ -631,9 +632,13 @@ static int Open(vlc_object_t *object)
     msg_Dbg(demux, "Detected image: %s",
             vlc_fourcc_GetDescription(VIDEO_ES, img->codec));
 
-    if( img->codec == VLC_CODEC_MXPEG )
-    {
-        return VLC_EGENERIC; //let avformat demux this file
+    /* Let avformat demux this file */
+    switch ( img->codec ) {
+    case VLC_CODEC_MXPEG:
+    case VLC_CODEC_BMP:
+        if ( module_exists( "avformat" ) ) {
+            return VLC_EGENERIC;
+        }
     }
 
     /* Load and if selected decode */
-- 
2.6.2



More information about the vlc-devel mailing list