[vlc-commits] avcodec: properly mark keyframe packets

Paul B Mahol git at videolan.org
Thu Apr 11 17:42:09 CEST 2019


vlc | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Apr 11 17:18:43 2019 +0200| [6fc1fc93506f75f9f74f01cd60d9d0ddd0d98ab3] | committer: Thomas Guillem

avcodec: properly mark keyframe packets

Certain codecs, like AGM depends on this.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6fc1fc93506f75f9f74f01cd60d9d0ddd0d98ab3
---

 modules/codec/avcodec/video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e7c34938b1..cccc84d22f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1082,6 +1082,8 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 pkt.size = p_block->i_buffer;
                 pkt.pts = p_block->i_pts != VLC_TICK_INVALID ? TO_AV_TS(p_block->i_pts) : AV_NOPTS_VALUE;
                 pkt.dts = p_block->i_dts != VLC_TICK_INVALID ? TO_AV_TS(p_block->i_dts) : AV_NOPTS_VALUE;
+                if (p_block->i_flags & BLOCK_FLAG_TYPE_I)
+                    pkt.flags |= AV_PKT_FLAG_KEY;
             }
             else
             {



More information about the vlc-commits mailing list