vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Jul 29 10:32:27 2019 +0200| [dc8ecee7c06354a847f65cb484fd9e78867305c8] | committer: Francois Cartegnie
demux: adaptive: reject compatible es without extra regression from previous changes > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc8ecee7c06354a847f65cb484fd9e78867305c8 --- modules/demux/adaptive/plumbing/FakeESOutID.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/demux/adaptive/plumbing/FakeESOutID.cpp b/modules/demux/adaptive/plumbing/FakeESOutID.cpp index ff99a4ea9e..1af954b16c 100644 --- a/modules/demux/adaptive/plumbing/FakeESOutID.cpp +++ b/modules/demux/adaptive/plumbing/FakeESOutID.cpp @@ -85,11 +85,15 @@ bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const case VLC_CODEC_H264: case VLC_CODEC_HEVC: case VLC_CODEC_VC1: - if(fmt.i_extra && p_other->fmt.i_extra) /* AnnexB vs DCR */ - return reinterpret_cast<uint8_t*>(fmt.p_extra)[0] != - reinterpret_cast<uint8_t*>(p_other->fmt.p_extra)[0]; - else - return true; + { + if(fmt.i_codec == p_other->fmt.i_codec && + fmt.i_extra && p_other->fmt.i_extra && + fmt.i_extra == p_other->fmt.i_extra) + { + return !!memcmp(fmt.p_extra, p_other->fmt.p_extra, fmt.i_extra); + } + else return false; /* no extra, can't tell anything */ + } default: if(fmt.i_cat == AUDIO_ES) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
