[vlc-devel] [PATCH] avcodec: mark encoded audio blocks as key frames when appropriate

Steve Lhomme robux4 at gmail.com
Mon Aug 8 14:33:47 CEST 2016


On Mon, Aug 8, 2016 at 2:25 PM, Filip Roséen <filip at atch.se> wrote:
> On 16/08/08 14:02, Steve Lhomme wrote:
>
>  diff --git a/modules/codec/avcodec/encoder.c
> b/modules/codec/avcodec/encoder.c
>  index 0f37683..7a7c227 100644
>  --- a/modules/codec/avcodec/encoder.c
>  +++ b/modules/codec/avcodec/encoder.c
>  @@ -1283,6 +1283,8 @@ static block_t *encode_audio_buffer( encoder_t
> *p_enc, encoder_sys_t *p_sys,  AV
>           p_block->i_dts = p_block->i_pts = packet.pts;
>       else
>           p_block->i_dts = p_block->i_pts = VLC_TS_INVALID;
>  +    if ( packet.flags & AV_PKT_FLAG_KEY )
>  +        p_block->i_flags = BLOCK_FLAG_TYPE_I;
>       return p_block;
>   }
>
> Given that these changes makes us respect AV_PKT_FLAG_KEY, would it not be
> appropriate to also mark the block with BLOCK_FLAG_CORRUPTED depending on
> the precense of AV_PKT_FLAG_CORRUPT in the same code-path?

IMO yes. Patch incoming.

> _______________________________________________
> 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