[vlc-devel] [PATCH 06/26] image: use sout_EncoderOpen instead of locally opening the module

Steve Lhomme robux4 at ycbcr.xyz
Mon Jan 18 08:32:45 UTC 2021


---
 src/misc/image.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/misc/image.c b/src/misc/image.c
index 92c75eaa8db..b1fd95aaa8c 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -742,8 +742,7 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, const video_format_t *fmt
     p_enc->fmt_out.video.i_height = p_enc->fmt_in.video.i_height;
 
     /* Find a suitable decoder module */
-    p_enc->p_module = module_need( p_enc, "video encoder", NULL, false );
-    if( !p_enc->p_module )
+    if( sout_EncoderOpen(p_enc, NULL, false) != VLC_SUCCESS )
     {
         msg_Err( p_enc, "no suitable encoder module for fourcc `%4.4s'.\n"
                  "VLC probably does not support this image format.",
-- 
2.29.2



More information about the vlc-devel mailing list