[vlc-devel] [PATCH] rawvideo: Revert "only copy the input es_format_t on output for the decoder"

Thomas Guillem thomas at gllm.fr
Thu Sep 14 09:53:13 CEST 2017


Fine with me

On Thu, Sep 14, 2017, at 09:45, Pierre Lamot wrote:
>   This reverts commit ac2886e617b9ba25d3c6f2d52a1bdaf020f119a7.
> 
>   Packetizer and decoder have their fmt_out initialized to 0 before
>   beeing opened,
>   they have to provide fmt_out. Raw video should provide the same format
>   as its
>   input.
> ---
>  modules/codec/rawvideo.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
> index 9c5853bed6..b616ddfdd4 100644
> --- a/modules/codec/rawvideo.c
> +++ b/modules/codec/rawvideo.c
> @@ -76,7 +76,7 @@ vlc_module_end ()
>  /**
>   * Common initialization for decoder and packetizer
>   */
> -static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
> +static int OpenCommon( decoder_t *p_dec )
>  {
>      const vlc_chroma_description_t *dsc =
>          vlc_fourcc_GetChromaDescription( p_dec->fmt_in.i_codec );
> @@ -100,8 +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 )
> -        es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
> +    es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
>  
>      if( p_dec->fmt_out.video.i_frame_rate == 0 ||
>          p_dec->fmt_out.video.i_frame_rate_base == 0)
> @@ -269,7 +268,7 @@ static int OpenDecoder( vlc_object_t *p_this )
>  {
>      decoder_t *p_dec = (decoder_t *)p_this;
>  
> -    int ret = OpenCommon( p_dec, false );
> +    int ret = OpenCommon( p_dec );
>      if( ret == VLC_SUCCESS )
>      {
>          p_dec->pf_decode = DecodeFrame;
> @@ -307,7 +306,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
>  {
>      decoder_t *p_dec = (decoder_t *)p_this;
>  
> -    int ret = OpenCommon( p_dec, true );
> +    int ret = OpenCommon( p_dec );
>      if( ret == VLC_SUCCESS )
>          p_dec->pf_packetize = SendFrame;
>      return ret;
> -- 
> 2.14.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list