[vlc-commits] packetizer: hevc: define private drop block flag

Francois Cartegnie git at videolan.org
Wed Apr 12 17:05:28 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Apr 12 10:22:11 2017 +0200| [a9160a25645187052649483d35d123aefded85f4] | committer: Francois Cartegnie

packetizer: hevc: define private drop block flag

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

 modules/packetizer/hevc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 94286b7529..923f67a214 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -100,6 +100,8 @@ struct decoder_sys_t
     cc_storage_t *p_ccs;
 };
 
+#define BLOCK_FLAG_DROP (1 << BLOCK_FLAG_PRIVATE_SHIFT)
+
 static const uint8_t p_hevc_startcode[3] = {0x00, 0x00, 0x01};
 /****************************************************************************
  * Helpers
@@ -144,7 +146,7 @@ static block_t * OutputQueues(decoder_sys_t *p_sys, bool b_valid)
     {
         p_output->i_flags |= i_flags;
         if(!b_valid)
-            p_output->i_flags |= BLOCK_FLAG_CORRUPTED;
+            p_output->i_flags |= BLOCK_FLAG_DROP;
     }
 
     return p_output;
@@ -702,13 +704,13 @@ static block_t *GatherAndValidateChain(block_t *p_outputchain)
 
     if(p_outputchain)
     {
-        if(p_outputchain->i_flags & BLOCK_FLAG_CORRUPTED)
+        if(p_outputchain->i_flags & BLOCK_FLAG_DROP)
             p_output = p_outputchain; /* Avoid useless gather */
         else
             p_output = block_ChainGather(p_outputchain);
     }
 
-    if(p_output && (p_output->i_flags & BLOCK_FLAG_CORRUPTED))
+    if(p_output && (p_output->i_flags & BLOCK_FLAG_DROP))
     {
         block_ChainRelease(p_output); /* Chain! see above */
         p_output = NULL;
@@ -776,7 +778,7 @@ static block_t *ParseNALBlock(decoder_t *p_dec, bool *pb_ts_used, block_t *p_fra
     {
         /* NAL is a VCL NAL */
         p_output = ParseVCL(p_dec, i_nal_type, p_frag);
-        if (p_output && (p_output->i_flags & BLOCK_FLAG_CORRUPTED))
+        if (p_output && (p_output->i_flags & BLOCK_FLAG_DROP))
             msg_Info(p_dec, "Waiting for VPS/SPS/PPS");
     }
     else



More information about the vlc-commits mailing list