Skip to content
Snippets Groups Projects
Commit 6ac4fd9e authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Jean-Baptiste Kempf
Browse files

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 0657b84e)
parent cd18bd16
No related branches found
No related tags found
2 merge requests!3533Backport MR 3236 to 3.0.x,!352[3.0] demux: adaptive: always restart if declared fourcc differs
Pipeline #113297 passed with stage
in 19 minutes and 28 seconds
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment