[vlc-commits] demux: adaptative: fix null deref

Francois Cartegnie git at videolan.org
Tue Nov 24 17:51:31 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 24 17:50:03 2015 +0100| [2506d44645fb040601d72660be4e975ad7ad3371] | committer: Francois Cartegnie

demux: adaptative: fix null deref

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

 modules/demux/adaptative/SegmentTracker.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptative/SegmentTracker.cpp b/modules/demux/adaptative/SegmentTracker.cpp
index 71fb6df..cc738f6 100644
--- a/modules/demux/adaptative/SegmentTracker.cpp
+++ b/modules/demux/adaptative/SegmentTracker.cpp
@@ -165,7 +165,7 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed, HTTPConnectionM
     SegmentChunk *chunk = segment->toChunk(count, rep, connManager);
 
     /* We need to check segment/chunk format changes, as we can't rely on representation's (HLS)*/
-    if(format != chunk->getStreamFormat())
+    if(chunk && format != chunk->getStreamFormat())
     {
         format = chunk->getStreamFormat();
         notify(SegmentTrackerEvent(&format));



More information about the vlc-commits mailing list