[vlc-commits] packetizer: hevc: fix getting xPS copy

Francois Cartegnie git at videolan.org
Thu Oct 22 18:52:55 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 22 17:40:10 2020 +0200| [f567d58460945b62a6cbfaf593338b3e08412477] | committer: Francois Cartegnie

packetizer: hevc: fix getting xPS copy

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

 modules/packetizer/hevc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 3fceb54037..0b5a837e65 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -495,13 +495,16 @@ static block_t *GetXPSCopy(decoder_sys_t *p_sys)
     struct hevc_tuple_s *xpstype[3] = {p_sys->rg_vps, p_sys->rg_sps, p_sys->rg_pps};
     size_t xpsmax[3] = {HEVC_VPS_ID_MAX, HEVC_SPS_ID_MAX, HEVC_PPS_ID_MAX};
     for(size_t i=0; i<3; i++)
+    {
+        struct hevc_tuple_s *xps = xpstype[i];
         for(size_t j=0; j<xpsmax[i]; j++)
         {
             block_t *p_dup;
-            if(xpstype[i]->p_nal &&
-               (p_dup = block_Duplicate(xpstype[i]->p_nal)))
+            if(xps[j].p_nal &&
+               (p_dup = block_Duplicate(xps[j].p_nal)))
                 block_ChainLastAppend(&pp_append, p_dup);
         };
+    }
     return p_chain;
 }
 



More information about the vlc-commits mailing list