[vlc-commits] decoder: use "video decoder" capability for video decoders

Rémi Denis-Courmont git at videolan.org
Mon Jun 19 19:59:28 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 19 20:50:34 2017 +0300| [ac866164aa3be234250801a2e2571b57448cc8df] | committer: Rémi Denis-Courmont

decoder: use "video decoder" capability for video decoders

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac866164aa3be234250801a2e2571b57448cc8df
---

 modules/codec/aom.c                  |  2 +-
 modules/codec/avcodec/avcodec.c      |  2 +-
 modules/codec/avcodec/video.c        |  3 ---
 modules/codec/bpg.c                  |  2 +-
 modules/codec/cdg.c                  |  2 +-
 modules/codec/crystalhd.c            |  2 +-
 modules/codec/daala.c                |  2 +-
 modules/codec/ddummy.c               |  8 ++++++++
 modules/codec/dmo/dmo.c              |  2 +-
 modules/codec/gstreamer/gstdecode.c  |  2 +-
 modules/codec/jpeg.c                 |  2 +-
 modules/codec/libmpeg2.c             |  2 +-
 modules/codec/mft.c                  |  5 +----
 modules/codec/oggspots.c             |  2 +-
 modules/codec/omxil/mediacodec.c     |  4 ++--
 modules/codec/omxil/omxil.c          |  4 ++--
 modules/codec/png.c                  |  2 +-
 modules/codec/rawvideo.c             |  2 +-
 modules/codec/schroedinger.c         |  2 +-
 modules/codec/sdl_image.c            |  2 +-
 modules/codec/svg.c                  |  2 +-
 modules/codec/theora.c               |  2 +-
 modules/codec/videotoolbox.m         |  5 +----
 modules/codec/vpx.c                  |  2 +-
 modules/codec/xwd.c                  |  2 +-
 modules/hw/mmal/codec.c              |  5 +----
 modules/misc/stats.c                 |  8 +++++++-
 modules/stream_out/mosaic_bridge.c   | 14 +++-----------
 modules/stream_out/transcode/video.c |  2 +-
 src/input/decoder.c                  |  2 +-
 src/misc/image.c                     |  2 +-
 31 files changed, 47 insertions(+), 53 deletions(-)

diff --git a/modules/codec/aom.c b/modules/codec/aom.c
index 2770b6deb0..0f68dd168e 100644
--- a/modules/codec/aom.c
+++ b/modules/codec/aom.c
@@ -48,7 +48,7 @@ static void CloseDecoder(vlc_object_t *);
 vlc_module_begin ()
     set_shortname("aom")
     set_description(N_("AOM video decoder"))
-    set_capability("decoder", 100)
+    set_capability("video decoder", 100)
     set_callbacks(OpenDecoder, CloseDecoder)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 2dcdc43bfa..104f7c44bb 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -78,7 +78,7 @@ vlc_module_begin ()
     set_section( N_("Decoding") , NULL )
 
     add_shortcut("ffmpeg")
-    set_capability("decoder", 70)
+    set_capability("video decoder", 70)
     set_callbacks(InitVideoDec, EndVideoDec)
 
     add_submodule()
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index d4b173658f..efda92e628 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -437,9 +437,6 @@ static int OpenVideoCodec( decoder_t *p_dec )
 int InitVideoDec( vlc_object_t *obj )
 {
     decoder_t *p_dec = (decoder_t *)obj;
-    if( p_dec->fmt_in.i_cat != VIDEO_ES )
-        return VLC_EGENERIC;
-
     const AVCodec *p_codec;
     AVCodecContext *p_context = ffmpeg_AllocContext( p_dec, &p_codec );
     if( p_context == NULL )
diff --git a/modules/codec/bpg.c b/modules/codec/bpg.c
index 757c0c696f..9df706c47d 100644
--- a/modules/codec/bpg.c
+++ b/modules/codec/bpg.c
@@ -47,7 +47,7 @@ vlc_module_begin()
     set_subcategory( SUBCAT_INPUT_VCODEC )
     /* decoder main module */
     set_description( N_("BPG image decoder") )
-    set_capability( "decoder", 60 )
+    set_capability( "video decoder", 60 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "bpg" )
 vlc_module_end()
diff --git a/modules/codec/cdg.c b/modules/codec/cdg.c
index 3bb0c3141d..f9d45d3991 100644
--- a/modules/codec/cdg.c
+++ b/modules/codec/cdg.c
@@ -86,7 +86,7 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_description( N_("CDG video decoder") )
-    set_capability( "decoder", 1000 )
+    set_capability( "video decoder", 1000 )
     set_callbacks( Open, Close )
     add_shortcut( "cdg" )
 vlc_module_end ()
diff --git a/modules/codec/crystalhd.c b/modules/codec/crystalhd.c
index 9a8d2e7acc..ae85ddfa94 100644
--- a/modules/codec/crystalhd.c
+++ b/modules/codec/crystalhd.c
@@ -88,7 +88,7 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_description( N_("Crystal HD hardware video decoder") )
-    set_capability( "decoder", 0 )
+    set_capability( "video decoder", 0 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "crystalhd" )
 vlc_module_end ()
diff --git a/modules/codec/daala.c b/modules/codec/daala.c
index ca94b67107..ba1ce9d059 100644
--- a/modules/codec/daala.c
+++ b/modules/codec/daala.c
@@ -118,7 +118,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_shortname( "Daala" )
     set_description( N_("Daala video decoder") )
-    set_capability( "decoder", 100 )
+    set_capability( "video decoder", 100 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "daala" )
     add_submodule ()
diff --git a/modules/codec/ddummy.c b/modules/codec/ddummy.c
index 895d1a27f9..193660a413 100644
--- a/modules/codec/ddummy.c
+++ b/modules/codec/ddummy.c
@@ -53,6 +53,10 @@ vlc_module_begin ()
     add_shortcut( "dummy" )
     add_submodule()
     add_shortcut( "dummy" )
+    set_capability( "video decoder", 0 )
+    set_callbacks( OpenDecoder, CloseDecoder )
+    add_submodule()
+    add_shortcut( "dummy" )
     set_capability( "audio decoder", 0 )
     set_callbacks( OpenDecoder, CloseDecoder )
 
@@ -64,6 +68,10 @@ vlc_module_begin ()
     add_shortcut( "dump" )
     add_submodule()
     add_shortcut( "dump")
+    set_capability( "video decoder", 0 )
+    set_callbacks( OpenDecoderDump, CloseDecoder )
+    add_submodule()
+    add_shortcut( "dump")
     set_capability( "audio decoder", 0 )
     set_callbacks( OpenDecoderDump, CloseDecoder )
 vlc_module_end ()
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index 7acbeef240..86d625e92b 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -90,7 +90,7 @@ static void CopyPicture( picture_t *, uint8_t * );
 vlc_module_begin ()
     set_description( N_("DirectMedia Object decoder") )
     add_shortcut( "dmo" )
-    set_capability( "decoder", 1 )
+    set_capability( "video decoder", 1 )
     set_callbacks( DecoderOpen, DecoderClose )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
diff --git a/modules/codec/gstreamer/gstdecode.c b/modules/codec/gstreamer/gstdecode.c
index dbaddcee41..1f4fb31d1a 100644
--- a/modules/codec/gstreamer/gstdecode.c
+++ b/modules/codec/gstreamer/gstdecode.c
@@ -92,7 +92,7 @@ vlc_module_begin( )
     /* decoder main module */
     set_description( N_( "GStreamer Based Decoder" ) )
     set_help( MODULE_DESCRIPTION )
-    set_capability( "decoder", 50 )
+    set_capability( "video decoder", 50 )
     set_section( N_( "Decoding" ) , NULL )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_bool( "use-decodebin", true, USEDECODEBIN_TEXT,
diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c
index 90cd06a18a..219fef9b31 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -109,7 +109,7 @@ vlc_module_begin()
     set_subcategory(SUBCAT_INPUT_VCODEC)
     /* decoder main module */
     set_description(N_("JPEG image decoder"))
-    set_capability("decoder", 1000)
+    set_capability("video decoder", 1000)
     set_callbacks(OpenDecoder, CloseDecoder)
     add_shortcut("jpeg")
 
diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index d460dbedd7..999aa24a4a 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -135,7 +135,7 @@ static int DpbDisplayPicture( decoder_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("MPEG I/II video decoder (using libmpeg2)") )
-    set_capability( "decoder", 50 )
+    set_capability( "video decoder", 50 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_callbacks( OpenDecoder, CloseDecoder )
diff --git a/modules/codec/mft.c b/modules/codec/mft.c
index a974745d5e..364b61aa99 100644
--- a/modules/codec/mft.c
+++ b/modules/codec/mft.c
@@ -61,7 +61,7 @@ static void Close(vlc_object_t *);
 vlc_module_begin()
     set_description(N_("Media Foundation Transform decoder"))
     add_shortcut("mft")
-    set_capability("decoder", 1)
+    set_capability("video decoder", 1)
     set_callbacks(Open, Close)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
@@ -1117,9 +1117,6 @@ static int Open(vlc_object_t *p_this)
     decoder_t *p_dec = (decoder_t *)p_this;
     decoder_sys_t *p_sys;
 
-    if (p_dec->fmt_in.i_cat != VIDEO_ES && p_dec->fmt_in.i_cat != AUDIO_ES)
-        return VLC_EGENERIC;
-
     p_sys = p_dec->p_sys = calloc(1, sizeof(*p_sys));
     if (!p_sys)
         return VLC_ENOMEM;
diff --git a/modules/codec/oggspots.c b/modules/codec/oggspots.c
index 9db89c40e3..9d4596d745 100644
--- a/modules/codec/oggspots.c
+++ b/modules/codec/oggspots.c
@@ -84,7 +84,7 @@ vlc_module_begin ()
     set_subcategory(SUBCAT_INPUT_VCODEC)
     set_shortname("OggSpots")
     set_description(N_("OggSpots video decoder"))
-    set_capability("decoder", 10)
+    set_capability("video decoder", 10)
     set_callbacks(OpenDecoder, CloseDecoder)
     add_shortcut("oggspots")
 
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index ac8123ceb4..cf56a38ef1 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -180,7 +180,7 @@ vlc_module_begin ()
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
     set_section(N_("Decoding"), NULL)
-    set_capability("decoder", 0) /* Only enabled via commandline arguments */
+    set_capability("video decoder", 0) /* Only enabled via commandline arguments */
     add_bool(CFG_PREFIX "dr", true,
              DIRECTRENDERING_TEXT, DIRECTRENDERING_LONGTEXT, true)
     add_bool(CFG_PREFIX "audio", false,
@@ -195,7 +195,7 @@ vlc_module_begin ()
         add_shortcut("mediacodec_ndk")
     add_submodule ()
         set_description("Video decoder using Android MediaCodec via JNI")
-        set_capability("decoder", 0)
+        set_capability("video decoder", 0)
         set_callbacks(OpenDecoderJni, CloseDecoder)
         add_shortcut("mediacodec_jni")
     add_submodule ()
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 130170bfa3..4451c6efb9 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -150,11 +150,11 @@ vlc_module_begin ()
     /* For IOMX, don't enable it automatically via priorities,
      * enable it only via the --codec iomx command line parameter when
      * wanted. */
-    set_capability( "decoder", 0 )
+    set_capability( "video decoder", 0 )
     add_bool(CFG_PREFIX "dr", true,
              DIRECTRENDERING_TEXT, DIRECTRENDERING_LONGTEXT, true)
 #else
-    set_capability( "decoder", 80 )
+    set_capability( "video decoder", 80 )
 #endif
     set_callbacks( OpenDecoder, CloseGeneric )
 #ifndef __ANDROID__
diff --git a/modules/codec/png.c b/modules/codec/png.c
index da97909bad..f82a80788e 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -89,7 +89,7 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_description( N_("PNG video decoder") )
-    set_capability( "decoder", 1000 )
+    set_capability( "video decoder", 1000 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "png" )
 
diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index 93d9fcd3c2..97833022d7 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -62,7 +62,7 @@ static void CloseCommon   ( vlc_object_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Pseudo raw video decoder") )
-    set_capability( "decoder", 50 )
+    set_capability( "video decoder", 50 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_callbacks( OpenDecoder, CloseCommon )
diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index e83240fbf8..d8ab310d28 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -361,7 +361,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_shortname( "Schroedinger" )
     set_description( N_("Dirac video decoder using libschroedinger") )
-    set_capability( "decoder", 200 )
+    set_capability( "video decoder", 200 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "schroedinger" )
 
diff --git a/modules/codec/sdl_image.c b/modules/codec/sdl_image.c
index de7999ccec..463b1be91d 100644
--- a/modules/codec/sdl_image.c
+++ b/modules/codec/sdl_image.c
@@ -59,7 +59,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_shortname( N_("SDL Image decoder"))
     set_description( N_("SDL_image video decoder") )
-    set_capability( "decoder", 60 )
+    set_capability( "video decoder", 60 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "sdl_image" )
 vlc_module_end ()
diff --git a/modules/codec/svg.c b/modules/codec/svg.c
index 3da62ad9ae..6b6dcd384a 100644
--- a/modules/codec/svg.c
+++ b/modules/codec/svg.c
@@ -61,7 +61,7 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_description( N_("SVG video decoder") )
-    set_capability( "decoder", 100 )
+    set_capability( "video decoder", 100 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "svg" )
 
diff --git a/modules/codec/theora.c b/modules/codec/theora.c
index 31dfd612a0..43404adc5a 100644
--- a/modules/codec/theora.c
+++ b/modules/codec/theora.c
@@ -114,7 +114,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_shortname( "Theora" )
     set_description( N_("Theora video decoder") )
-    set_capability( "decoder", 100 )
+    set_capability( "video decoder", 100 )
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "theora" )
 #   define DEC_CFG_PREFIX "theora-"
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 9e09e26345..7806bd7843 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -76,7 +76,7 @@ vlc_module_begin()
 set_category(CAT_INPUT)
 set_subcategory(SUBCAT_INPUT_VCODEC)
 set_description(N_("VideoToolbox video decoder"))
-set_capability("decoder",800)
+set_capability("video decoder",800)
 set_callbacks(OpenDecoder, CloseDecoder)
 
 add_bool("videotoolbox-temporal-deinterlacing", true, VT_TEMPO_DEINTERLACE, VT_TEMPO_DEINTERLACE_LONG, false)
@@ -830,9 +830,6 @@ static int OpenDecoder(vlc_object_t *p_this)
     }
 #endif
 
-    if (p_dec->fmt_in.i_cat != VIDEO_ES)
-        return VLC_EGENERIC;
-
     /* Fail if this module already failed to decode this ES */
     if (var_Type(p_dec, "videotoolbox-failed") != 0)
         return VLC_EGENERIC;
diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index c1f3bf73a0..93d76cc73f 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -64,7 +64,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict);
 vlc_module_begin ()
     set_shortname("vpx")
     set_description(N_("WebM video decoder"))
-    set_capability("decoder", 100)
+    set_capability("video decoder", 100)
     set_callbacks(OpenDecoder, CloseDecoder)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
diff --git a/modules/codec/xwd.c b/modules/codec/xwd.c
index dd3c8af7cb..3239678f55 100644
--- a/modules/codec/xwd.c
+++ b/modules/codec/xwd.c
@@ -34,7 +34,7 @@ static int Open(vlc_object_t *);
 
 vlc_module_begin()
     set_description(N_("XWD image decoder"))
-    set_capability("decoder", 50)
+    set_capability("video decoder", 50)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
     set_callbacks(Open, NULL)
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index c01d1e4635..b816473c61 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -57,7 +57,7 @@ static void CloseDecoder(decoder_t *dec);
 vlc_module_begin()
     set_shortname(N_("MMAL decoder"))
     set_description(N_("MMAL-based decoder plugin for Raspberry Pi"))
-    set_capability("decoder", 90)
+    set_capability("video decoder", 90)
     add_shortcut("mmal_decoder")
     add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false)
     set_callbacks(OpenDecoder, CloseDecoder)
@@ -105,9 +105,6 @@ static int OpenDecoder(decoder_t *dec)
     MMAL_PARAMETER_UINT32_T extra_buffers;
     MMAL_STATUS_T status;
 
-    if (dec->fmt_in.i_cat != VIDEO_ES)
-        return VLC_EGENERIC;
-
     if (dec->fmt_in.i_codec != VLC_CODEC_MPGV &&
             dec->fmt_in.i_codec != VLC_CODEC_H264)
         return VLC_EGENERIC;
diff --git a/modules/misc/stats.c b/modules/misc/stats.c
index f8c8781bac..ec5dfee2c7 100644
--- a/modules/misc/stats.c
+++ b/modules/misc/stats.c
@@ -220,7 +220,7 @@ vlc_module_begin ()
 #endif
         set_section( N_( "Stats decoder" ), NULL )
         set_description( N_("Stats decoder function") )
-        set_capability( "decoder", 0 )
+        set_capability( "video decoder", 0 )
         add_shortcut( "stats" )
         set_callbacks( OpenDecoder, NULL )
     add_submodule()
@@ -229,6 +229,12 @@ vlc_module_begin ()
         set_capability( "audio decoder", 0 )
         add_shortcut( "stats" )
         set_callbacks( OpenDecoder, NULL )
+    add_submodule()
+        set_section( N_( "Stats decoder" ), NULL )
+        set_description( N_("Stats decoder function") )
+        set_capability( "decoder", 0 )
+        add_shortcut( "stats" )
+        set_callbacks( OpenDecoder, NULL )
     add_submodule ()
         set_section( N_( "Stats demux" ), NULL )
         set_description( N_("Stats demux function") )
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 3e87d5debb..04864c90f7 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -307,19 +307,11 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p
     //p_sys->p_decoder->p_cfg = p_sys->p_video_cfg;
 
     p_sys->p_decoder->p_module =
-        module_need( p_sys->p_decoder, "decoder", "$codec", false );
+        module_need( p_sys->p_decoder, "video decoder", "$codec", false );
 
-    if( !p_sys->p_decoder->p_module || p_sys->p_decoder->fmt_out.i_cat != VIDEO_ES )
+    if( !p_sys->p_decoder->p_module )
     {
-        if( p_sys->p_decoder->fmt_out.i_cat != VIDEO_ES )
-        {
-            msg_Err( p_stream, "instanciated a non video decoder" );
-            module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
-        }
-        else
-        {
-            msg_Err( p_stream, "cannot find decoder" );
-        }
+        msg_Err( p_stream, "cannot find decoder" );
         free( p_sys->p_decoder->p_owner );
         vlc_object_release( p_sys->p_decoder );
         return NULL;
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 250ae143ee..50b21bc0ff 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -196,7 +196,7 @@ int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
     id->p_decoder->p_owner->id = id;
 
     id->p_decoder->p_module =
-        module_need( id->p_decoder, "decoder", "$codec", false );
+        module_need( id->p_decoder, "video decoder", "$codec", false );
 
     if( !id->p_decoder->p_module )
     {
diff --git a/src/input/decoder.c b/src/input/decoder.c
index db9ff0531f..50155283b3 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -172,7 +172,7 @@ static int LoadDecoder( decoder_t *p_dec, bool b_packetizer,
     if( !b_packetizer )
     {
         const char caps[ES_CATEGORY_COUNT][16] = {
-            [VIDEO_ES] = "decoder",
+            [VIDEO_ES] = "video decoder",
             [AUDIO_ES] = "audio decoder",
             [SPU_ES] = "decoder",
         };
diff --git a/src/misc/image.c b/src/misc/image.c
index 9b4631ecaa..20582ef1d6 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -655,7 +655,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
     p_dec->pf_vout_buffer_new = video_new_buffer;
 
     /* Find a suitable decoder module */
-    p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
+    p_dec->p_module = module_need( p_dec, "video decoder", "$codec", false );
     if( !p_dec->p_module )
     {
         msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'. "



More information about the vlc-commits mailing list