Skip to content
Snippets Groups Projects

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

Merged Alexandre Janniaux requested to merge alexandre-janniaux/vlc:decoder-flush-fix/1 into master

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

Merge request pipeline #261540 passed

Merge request pipeline passed for b510622c

Merged by Steve LhommeSteve Lhomme 2 years ago (Sep 12, 2022 7:07am UTC)

Loading

Pipeline #261873 failed

Pipeline failed for b510622c on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading