<div>i dont think that it is one bug.</div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "Filip Roséen";<filip@atch.se>;</div><div><b>Send time:</b> Tuesday, Feb 7, 2017 9:35 AM</div><div><b>To:</b> "vlc-devel"<vlc-devel@videolan.org>; <wbr></div><div></div><div><b>Subject: </b> [vlc-devel] [PATCH] packetizer/h264: fix resource deallocationduring Close</div></div><div><br></div>The previous loop condition suffers from an off-by-one error, meaning<br>that the last resource in p_sys->pp_sps and p_sys->pp_pps would never<br>be released if populated.<br><br>fixes #17987<br><br>--<br><br>Personally I am not a big fan of loop-conditions such as these (fixed)<br>ones (because they are very error-prone), though given that this is<br>the aesthetics used in the rest of the relevant translation-unit I<br>will refrain from refactoring it.<br>---<br> modules/packetizer/h264.c | 4 ++--<br> 1 file changed, 2 insertions(+), 2 deletions(-)<br><br>diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c<br>index 1b455af479..4d2db65f76 100644<br>--- a/modules/packetizer/h264.c<br>+++ b/modules/packetizer/h264.c<br>@@ -330,12 +330,12 @@ static void Close( vlc_object_t *p_this )<br> <br>     if( p_sys->p_frame )<br>         block_ChainRelease( p_sys->p_frame );<br>-    for( i = 0; i < H264_SPS_ID_MAX; i++ )<br>+    for( i = 0; i <= H264_SPS_ID_MAX; i++ )<br>     {<br>         if( p_sys->pp_sps[i] )<br>             block_Release( p_sys->pp_sps[i] );<br>     }<br>-    for( i = 0; i < H264_PPS_ID_MAX; i++ )<br>+    for( i = 0; i <= H264_PPS_ID_MAX; i++ )<br>     {<br>         if( p_sys->pp_pps[i] )<br>             block_Release( p_sys->pp_pps[i] );<br>-- <br>2.11.1<br><br>_______________________________________________<br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br>https://mailman.videolan.org/listinfo/vlc-devel</div>