[vlc-devel] [PATCH 2/3] rawvideo: fmt_out should be filled in paquetizer mode and not in decoder mode
robux4 at gmail.com
Thu Sep 7 11:34:23 CEST 2017
On Wed, Sep 6, 2017 at 3:49 PM, pierre <pierre at videolabs.io> wrote:
> 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
>> 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
Following my work on es_format usage I found that the core/loader
initializes the fmt_out when opening a decoder but not a packetizer.
That's why all packetizers end up doing es_format_Copy(
&p_dec->fmt_out, &p_dec->fmt_in ) on init.
The original patch tried to reflect this. Except the logic was
inverted. So this patch is correct in that regard.
I am fine with having a more consistent way to create decoders and
packetizers that always do the basic copy for them.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel