[vlc-devel] [PATCH 4/4] Add rav1e encoder module

Thomas Guillem thomas at gllm.fr
Tue Jul 21 14:44:57 CEST 2020


Indeed, the length part can be removed.

On Tue, Jul 21, 2020, at 14:37, Francois Cartegnie wrote:
> Le 21/07/2020 à 14:19, Steve Lhomme a écrit :
> > On 2020-07-21 13:59, Francois Cartegnie wrote:
> >> Le 21/07/2020 à 11:34, rustyc a écrit :
> >>> +
> >>> +                memcpy(p_block->p_buffer, pkt->data, pkt->len);
> >>> +                p_block->i_dts = p_block->i_pts = date_Get(&sys->date);
> >>> +                p_block->i_length =
> >>> +                   
> >>> vlc_tick_from_samples(enc->fmt_in.video.i_frame_rate_base,
> >>> +                                         
> >>> enc->fmt_in.video.i_frame_rate);
> >>> +                date_Increment(&sys->date, 1);
> >>> +
> >>> +                if (pkt->frame_type == RA_FRAME_TYPE_KEY)
> >>> +                    p_block->i_flags |= BLOCK_FLAG_TYPE_I;
> >>> +                block_ChainAppend(&p_out, p_block);
> >>> +                rav1e_packet_unref(pkt);
> >>
> >> Using date_t to avoid rounding errors and vlc_tick_from_samples to
> >> introduce some ?
> > 
> > The code looks correct to me.
> 
> It's not.
> If you don't compute length properly then don't set it.
> 
> -- 
> Francois Cartegnie
> VideoLAN - VLC Developer
> _______________________________________________
> 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