vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Oct 9 15:46:49 2015 +0200| [8611385b2ab746fd74c2ee34941ac86fd1070370] | committer: Francois Cartegnie
demux: adaptative: change fmt compatibility checks nal based codecs should be able to restart by themselves. aac needs rate checking wich isn't specified by demuxer > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8611385b2ab746fd74c2ee34941ac86fd1070370 --- modules/demux/adaptative/plumbing/FakeESOutID.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/demux/adaptative/plumbing/FakeESOutID.cpp b/modules/demux/adaptative/plumbing/FakeESOutID.cpp index 5121123..ec2313ec 100644 --- a/modules/demux/adaptative/plumbing/FakeESOutID.cpp +++ b/modules/demux/adaptative/plumbing/FakeESOutID.cpp @@ -68,9 +68,24 @@ const es_format_t *FakeESOutID::getFmt() const bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const { - return es_format_IsSimilar( &p_other->fmt, &fmt ) && - p_other->fmt.i_extra == fmt.i_extra && - (p_other->fmt.i_extra == 0 || !memcmp( p_other->fmt.p_extra, fmt.p_extra, fmt.i_extra )); + switch(fmt.i_codec) + { + case VLC_CODEC_H264: + case VLC_CODEC_HEVC: + case VLC_CODEC_VC1: + return true; + + default: + if(fmt.i_cat == AUDIO_ES) + { + /* Reject audio streams with different or unknown rates */ + if(fmt.audio.i_rate != p_other->fmt.audio.i_rate || !fmt.audio.i_rate) + return false; + } + + return es_format_IsSimilar( &p_other->fmt, &fmt ) && + !p_other->fmt.i_extra && !fmt.i_extra; + } } void FakeESOutID::setScheduledForDeletion() _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
