[vlc-devel] [PATCH] demux: adaptive: fix es recyling

Zhao Zhili quinkblack at foxmail.com
Thu May 10 03:48:18 CEST 2018

On 2018年05月10日 01:24, Rémi Denis-Courmont wrote:
> Le mercredi 9 mai 2018, 19:30:08 EEST Zhao Zhili a écrit :
>>> On 9 May 2018, at 11:49 PM, Francois Cartegnie <fcvlcdev at free.fr> wrote:
>>> Le 09/05/2018 à 15:32, Zhao Zhili a écrit :
>>>> If there is no esid is selected in the same category, should the new esid
>>>> be unselected too?>
>>> es format category for differents streams can't change by design.
>> Sorry,I didn't make myself clear.
>> Assume audio tracks are disabled. During seek, 'new' audio es id may treated
>> as incompatible if the sample rate is not set, although it can be the same
>> track. Then it's added as new es_id, and selected as the active audio
>> track. Audio tracks are not disabled anymore after seek, see #20436.
> This is a classical example of the contradiction between level-triggered
> automation (in this case, the ES automatic selection) and edge-triggered
> manual override (in this case, disabling an automatically selected ES).
> At which point / in which cases should the automation cancel out the override?
> It might be better to just keep audio disabled for the remaining lifetime of
> the ES output, when the user disables the sole enabled audio track. That
> should not involve any change in Adaptive, AFAIU.

The issue can be solved by sending more format info from the
demuxer owned by adaptive to pass the compatible check. This
is required to solve another problem: the selected audio track is
changed after seek, since all tracks don't pass the compatible
check and be added as new tracks.

Anyway, please review the current patch.

More information about the vlc-devel mailing list