[vlc-commits] chromecast: fix block leaks in case of error

Thomas Guillem git at videolan.org
Mon Jul 9 11:25:28 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jul  9 11:25:05 2018 +0200| [560e0c8fffee97a771f706b65e4174af8d667374] | committer: Thomas Guillem

chromecast: fix block leaks in case of error

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

 modules/stream_out/chromecast/cast.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 8830f57cad..855cf79b1f 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -324,7 +324,7 @@ static int ProxySend(sout_stream_t *p_stream, void *_id, block_t *p_buffer)
             if (p_buffer->i_pts < p_sys->first_video_keyframe_pts
              || p_sys->first_video_keyframe_pts == -1)
             {
-                block_Release(p_buffer);
+                block_ChainRelease(p_buffer);
                 return VLC_SUCCESS;
             }
         }
@@ -347,7 +347,7 @@ static int ProxySend(sout_stream_t *p_stream, void *_id, block_t *p_buffer)
     }
     else
     {
-        block_Release(p_buffer);
+        block_ChainRelease(p_buffer);
         return VLC_SUCCESS;
     }
 }
@@ -1409,14 +1409,14 @@ static int Send(sout_stream_t *p_stream, void *_id, block_t *p_buffer)
 
     if( p_sys->isFlushing( p_stream ) )
     {
-        block_Release( p_buffer );
+        block_ChainRelease( p_buffer );
         return VLC_SUCCESS;
     }
 
     sout_stream_id_sys_t *next_id = p_sys->GetSubId( p_stream, id );
     if ( next_id == NULL )
     {
-        block_Release( p_buffer );
+        block_ChainRelease( p_buffer );
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list