Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • VLC VLC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,720
    • Issues 3,720
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 230
    • Merge requests 230
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLANVideoLAN
  • VLCVLC
  • Issues
  • #26915
Closed
Open
Issue created May 06, 2022 by Zhao Zhili@quinkContributor

Spurious decoder_NewPicture failure leading to decoder error

For AV1 in MP4, dav1d failed after seek:

Decoder feed error -1

dav1d get new picture buffer via NewPicture(). It turns out that the error is triggered by decoder_NewPicture(), which in turn is triggered by picture_pool_Cancel() in vlc_input_decoder_Flush().

@tguillem add picture_pool_Cancel() to vlc_input_decoder_Flush() to solve the slow flush issue:

commit 9602cf7e738c5d3cc4f0b0156017110c844cdfb3
Author: Thomas Guillem <thomas@gllm.fr>
Date:   Fri Nov 27 16:18:44 2020 +0100

    decoder: fix slow video flush

    Video flush was taking between 1 seconds to 10 seconds because the flush
    request was not processed by the DecoderThread that was stuck in
    pf_decode() callbacks waiting for new pictures.

Looks like it doesn't work well with decoder_NewPicture():

  1. decoder_NewPicture() return NULL on error, we don't know if it's malloc failure, or cancel on purpose.
  2. Most decoder can continue after decoder_NewPicture() return NULL, dav1d is an exception.
  3. Continue after decoder_NewPicture() failure is more like a bug, unless decoder_NewPicture() can notify error code.
  4. Even if decoder_NewPicture() can notify something like EAGAIN, third party decoders may not able to handle that and recover, since picture buffer callback is more like malloc(), either success or critical failure.

Maybe we need another method to solve the slow flush issue.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking

VideoLAN code repository instance