[vlc-commits] [Git][videolan/vlc][master] input: es_out: fix ES_OUT_SET_FMT check
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Tue Nov 30 13:58:58 UTC 2021
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
22e360d3 by Francois Cartegnie at 2021-11-30T13:44:03+00:00
input: es_out: fix ES_OUT_SET_FMT check
auto assigned ID can't be compared to auto assignment request value
- - - - -
1 changed file:
- src/input/es_out.c
Changes:
=====================================
src/input/es_out.c
=====================================
@@ -3468,14 +3468,16 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
es_out_id_t *es = va_arg( args, es_out_id_t * );
es_format_t *p_fmt = va_arg( args, es_format_t * );
if( es == NULL || es->fmt.i_cat != p_fmt->i_cat
- || es->fmt.i_id != p_fmt->i_id
+ || (es->fmt.i_id != p_fmt->i_id && p_fmt->i_id != -1)
|| es->fmt.i_group != p_fmt->i_group )
return VLC_EGENERIC;
+ const int i_id = es->fmt.i_id;
es_format_Clean( &es->fmt );
int ret = es_format_Copy( &es->fmt, p_fmt );
if( ret != VLC_SUCCESS )
return ret;
+ es->fmt.i_id = i_id;
EsOutFillEsFmt( out, &es->fmt );
EsOutUpdateEsLanguageTitle(es, &es->fmt);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/22e360d398b65874c84531d5181b46eed835a0bc
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/22e360d398b65874c84531d5181b46eed835a0bc
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list