[vlc-devel] [PATCH 2/3] rawvideo: fmt_out should be filled in paquetizer mode and not in decoder mode

pierre pierre at videolabs.io
Wed Sep 6 15:49:39 CEST 2017


On Wednesday, September 6, 2017 4:25:08 PM CEST Rémi Denis-Courmont wrote:
> Le 6 septembre 2017 16:01:02 GMT+03:00, Pierre Lamot <pierre at videolabs.io> a 
écrit :
> >  The inverse was done
> >
> >---
> >
> > modules/codec/rawvideo.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
> >index 9c5853bed6..b8a5317889 100644
> >--- a/modules/codec/rawvideo.c
> >+++ b/modules/codec/rawvideo.c
> >@@ -100,7 +100,7 @@ static int OpenCommon( decoder_t *p_dec, bool
> >b_packetizer )
> >
> >     if( !p_dec->fmt_in.video.i_visible_height )
> >   
> >   p_dec->fmt_in.video.i_visible_height = p_dec->fmt_in.video.i_height;
> >
> >-    if ( !b_packetizer )
> >+    if ( b_packetizer )
> >
> >         es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
> >     
> >     if( p_dec->fmt_out.video.i_frame_rate == 0 ||
> 
> No. Output format should be filed in all modes (unless default values are
> OK).
> 
> I don't if the patch is right or wronh because the description does not make
> much sense.

My original idea was to revert "ac2886e617: rawvideo: only copy the input 
es_format_t on output for the decoder", but I discussed this with the author 
who told me that copying in decoder mode might lead to leaks, hence these two 
patchs.


More information about the vlc-devel mailing list