[vlc-commits] avcodec: mark encoded audio blocks as key frames/ corrupted when appropriate

Steve Lhomme git at videolan.org
Mon Aug 8 19:31:28 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Aug  8 14:34:36 2016 +0200| [66df76dfb8807a47fde0317615435321ce4659f9] | committer: Jean-Baptiste Kempf

avcodec: mark encoded audio blocks as key frames/corrupted when appropriate

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/avcodec/encoder.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 0f37683..cb621aa 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1283,6 +1283,10 @@ 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;
+    if ( packet.flags & AV_PKT_FLAG_CORRUPT )
+        p_block->i_flags |= BLOCK_FLAG_CORRUPTED;
     return p_block;
 }
 



More information about the vlc-commits mailing list