vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Thu May 16 10:30:37 2019 +0200| [cb9e634a375aac4824b82a5206b242e328a50fc2] | committer: Francois Cartegnie
demux: adaptive: strengthen es recycling rules cannot recycle h264 <-> avc1 and the like > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb9e634a375aac4824b82a5206b242e328a50fc2 --- modules/demux/adaptive/plumbing/FakeESOutID.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/demux/adaptive/plumbing/FakeESOutID.cpp b/modules/demux/adaptive/plumbing/FakeESOutID.cpp index 41b93d9904..ff99a4ea9e 100644 --- a/modules/demux/adaptive/plumbing/FakeESOutID.cpp +++ b/modules/demux/adaptive/plumbing/FakeESOutID.cpp @@ -75,11 +75,20 @@ bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const if( p_other->fmt.i_cat != fmt.i_cat ) return false; + if(fmt.i_original_fourcc != p_other->fmt.i_original_fourcc) + return false; + if((fmt.i_extra > 0) ^ (p_other->fmt.i_extra > 0)) + return false; + switch(fmt.i_codec) { 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; default: @@ -90,8 +99,7 @@ bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const return false; } - return es_format_IsSimilar( &p_other->fmt, &fmt ) && - !p_other->fmt.i_extra && !fmt.i_extra; + return es_format_IsSimilar( &p_other->fmt, &fmt ); } } _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits