[vlc-commits] demux: adaptive: reject compatible es without extra
Francois Cartegnie
git at videolan.org
Mon Mar 30 16:16:12 CEST 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 29 10:32:27 2019 +0200| [8b152639704dc4a297e04bc82abf9e8d771c5b5f] | committer: Francois Cartegnie
demux: adaptive: reject compatible es without extra
regression from previous changes
(cherry picked from commit dc8ecee7c06354a847f65cb484fd9e78867305c8)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=8b152639704dc4a297e04bc82abf9e8d771c5b5f
---
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)
More information about the vlc-commits
mailing list