[vlc-devel] [PATCH 10/25] demux:mjpeg: init the ES to VLC_CODEC_MJPG directly

Steve Lhomme robux4 at videolabs.io
Mon Jul 10 16:52:14 CEST 2017


---
 modules/demux/mjpeg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index a66f3871f5..81db1002db 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -383,8 +383,7 @@ static int Open( vlc_object_t * p_this )
         p_sys->b_still = false;
     p_sys->i_frame_length = f_fps ? (CLOCK_FREQ / f_fps) : 0;
 
-    es_format_Init( &p_sys->fmt, VIDEO_ES, 0 );
-    p_sys->fmt.i_codec = VLC_CODEC_MJPG;
+    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_CODEC_MJPG );
 
     p_sys->p_es = es_out_Add( p_demux->out, &p_sys->fmt );
     return VLC_SUCCESS;
-- 
2.12.1



More information about the vlc-devel mailing list