Skip to content
Snippets Groups Projects
Commit 0657b84e authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
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
parent c7f6b93b
No related branches found
No related tags found
1 merge request!265demux: adaptive: always restart if declared fourcc differs
Pipeline #107795 passed with stage
in 1 hour and 1 minute
......@@ -82,11 +82,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;
......@@ -101,8 +101,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