[vlc-commits] demux: adaptative: fix NULL memcmp

Francois Cartegnie git at videolan.org
Mon Oct 5 23:31:43 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct  2 23:03:26 2015 +0200| [78337638e0b5a54baa42c84fada2a0278dfb5e08] | committer: Francois Cartegnie

demux: adaptative: fix NULL memcmp

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

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

diff --git a/modules/demux/adaptative/plumbing/FakeESOutID.cpp b/modules/demux/adaptative/plumbing/FakeESOutID.cpp
index 60beaeb..7edbbe4 100644
--- a/modules/demux/adaptative/plumbing/FakeESOutID.cpp
+++ b/modules/demux/adaptative/plumbing/FakeESOutID.cpp
@@ -59,5 +59,5 @@ bool FakeESOutID::isCompatible( const es_format_t *p_fmt ) const
 {
     return es_format_IsSimilar( p_fmt, &fmt ) &&
            p_fmt->i_extra == fmt.i_extra &&
-          !memcmp( p_fmt->p_extra, fmt.p_extra, p_fmt->i_extra );
+           (p_fmt->i_extra == 0 || !memcmp( p_fmt->p_extra, fmt.p_extra, p_fmt->i_extra ));
 }



More information about the vlc-commits mailing list