Skip to content

input decoder: fix flush, race conditions and add non-regression tests

The test provides an infrastructure based on previous transcode tests and video output tests, that will serve as basis for other input_decoder.c tests.

The merge request:

  • fixes use-after-free on the fifo with output notifying the input decoder.
  • fixes flush (and thus #26915 (closed)) by ensuring queued picture while flushing are directly returned to the decoder, and flushing the output before the decoder thread is free to execute the flush.
  • fixes races with the handling of closed captions subdecoders, whose execution model is a subpipeline of the input_decoder model, and thus was missing a necessary lock to synchronize both.
  • remove the previous picture_pool cancellation, which is unused after flush is fixed
  • fixes locking across the input_decoder pipeline, with owner->lock and fifo lock playing the same role, leading to some variable being raced, or deadlock if the two locks were taken.
  • add some documentation about the locking (which needs extension to the CC).

I'm not against adding more tests before merging this, and I can split if required.

Edited by Alexandre Janniaux

Merge request reports