[vlc-commits] avcodec: encoder: handle avpacket key-flag
Ilkka Ollakka
git at videolan.org
Fri Sep 30 08:43:27 CEST 2016
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Sep 30 09:37:35 2016 +0300| [83021a62f7b06de6a5a56df6957922f217e285de] | committer: Ilkka Ollakka
avcodec: encoder: handle avpacket key-flag
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83021a62f7b06de6a5a56df6957922f217e285de
---
modules/codec/avcodec/encoder.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 3f05ef6..ef6c8aa 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1107,6 +1107,8 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo
p_block->i_dts = packet->dts;
if( unlikely( packet->flags & AV_PKT_FLAG_CORRUPT ) )
p_block->i_flags |= BLOCK_FLAG_CORRUPTED;
+ if( packet->flags & AV_PKT_FLAG_KEY )
+ p_block->i_flags |= BLOCK_FLAG_TYPE_I;
p_block->i_pts = p_block->i_pts * CLOCK_FREQ * context->time_base.num / context->time_base.den;
p_block->i_dts = p_block->i_dts * CLOCK_FREQ * context->time_base.num / context->time_base.den;
More information about the vlc-commits
mailing list