[vlc-commits] [Git][videolan/vlc][master] demux: mp4: use proper type and bitmask comparison for m4a filter
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Feb 3 09:14:19 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b38f2b6c by Francois Cartegnie at 2023-02-03T08:51:10+00:00
demux: mp4: use proper type and bitmask comparison for m4a filter
- - - - -
1 changed file:
- modules/demux/mp4/mp4.c
Changes:
=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -142,7 +142,7 @@ typedef struct
struct
{
- int es_cat_filters;
+ enum es_format_category_e es_cat_filter;
} hacks;
mp4_fragments_index_t *p_fragsindex;
@@ -923,7 +923,7 @@ static int Open( vlc_object_t * p_this )
case BRAND_M4A:
msg_Dbg( p_demux, "iTunes audio" );
if( var_InheritBool( p_demux, CFG_PREFIX"m4a-audioonly" ) )
- p_sys->hacks.es_cat_filters = AUDIO_ES;
+ p_sys->hacks.es_cat_filter = AUDIO_ES;
break;
default:
msg_Dbg( p_demux,
@@ -1263,6 +1263,8 @@ static int Open( vlc_object_t * p_this )
p_sys->asfpacketsys.pf_updatetime = NULL;
p_sys->asfpacketsys.pf_setaspectratio = NULL;
+ p_sys->hacks.es_cat_filter = UNKNOWN_ES;
+
return VLC_SUCCESS;
error:
@@ -3677,7 +3679,8 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
}
}
- if( p_sys->hacks.es_cat_filters && (p_sys->hacks.es_cat_filters & p_track->fmt.i_cat) == 0 )
+ if( p_sys->hacks.es_cat_filter != UNKNOWN_ES &&
+ p_sys->hacks.es_cat_filter != p_track->fmt.i_cat )
{
p_track->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b38f2b6c5f0a5594ec8da78dab7c6ebd3af9a8b1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b38f2b6c5f0a5594ec8da78dab7c6ebd3af9a8b1
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list