Skip to content

test: video_output: fix test not ending correctly

Alexandre Janniaux requested to merge alexandre-janniaux/vlc:fix-26374/1 into master

The test was failing randomly because the decoder was asked to decode more data and its output format was reset to VLC_CODEC_UNKNOWN, which is not an allocatable format for picture_NewFromResource.

Abandon the picture allocation in decoder_decoder(dec, picture) callback to let the scenario handle the allocation, and in particular discard it if it already did the test. The new test_finished boolean will force the decoder callback to no-op. It is a bit redundant with the display_opened callback where it could loop doing the update until it is correctly closed but much clearer.

I'm not sure yet, but it seems that the easiest method to control the behaviour of the test is to have a custom demux to push data at will. It's adding a lot of code and is trickier to manage so here we fix the test first.

Fixes #26374 (closed)

Merge request reports

Loading