[vlc-commits] [Git][videolan/vlc][3.0.x] demux: adaptive: always restart if declared fourcc differs

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Jul 3 10:38:13 UTC 2021



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
6ac4fd9e by Francois Cartegnie at 2021-07-03T10:14:50+00:00
demux: adaptive: always restart if declared fourcc differs

es_format_IsSimilar compares tranlated fourcc, ending matching AVC1 &
H264

avcodec then truncates NAL and glitches hard from wrong format

refs #25606

(cherry picked from commit 0657b84ec8d64b07b80eeafd8512f8fd32dc55ea)

- - - - -


1 changed file:

- modules/demux/adaptive/plumbing/FakeESOutID.cpp


Changes:

=====================================
modules/demux/adaptive/plumbing/FakeESOutID.cpp
=====================================
@@ -72,11 +72,11 @@ const es_format_t *FakeESOutID::getFmt() const
 
 bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const
 {
-    if( p_other->fmt.i_cat != fmt.i_cat )
+    if( p_other->fmt.i_cat != fmt.i_cat ||
+        fmt.i_codec != p_other->fmt.i_codec ||
+        fmt.i_original_fourcc != p_other->fmt.i_original_fourcc )
         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;
 
@@ -91,8 +91,7 @@ bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) const
         case VLC_CODEC_VC1:
         case VLC_CODEC_AV1:
         {
-            if(fmt.i_codec == p_other->fmt.i_codec &&
-               fmt.i_extra && p_other->fmt.i_extra &&
+            if(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);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6ac4fd9e839979f1832f56ba7f832a5277231ab3

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6ac4fd9e839979f1832f56ba7f832a5277231ab3
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list