Skip to content
Snippets Groups Projects

viddec: don't configure an incorrect buffer pool when receiving a gap event

Merged Matthew Waters requested to merge ystreet/gst-libav:video-dec-gap-negotiation into master

Scenario is this:

  1. libav receives enough data to want a buffer with get_buffer2() which wants a buffer pool with a certain format, say Y42B but does not negotiate and therefore GstVideoDecoder does not have any output state configured
  2. A gap event is received which GstVideoDecoder wants to forward. It needs caps to forward the gap event so attempts to negotiate with some default information which chooses e.g. I420 and overwrites the previously configured bufferpool decided on by get_buffer2()
  3. There is a mismatch between what ensure_internal_pool() check for consistency and what decide_allocation() sets when overriding the internal pool with the downstream pool.
  4. FFMpeg then requests a Y42B buffer from an I420 pool and predictably crashes writing past the contents of the buffer

This is fixed by keeping track of the internal pool states correctly.

Edited by Matthew Waters

Merge request reports

Merge request pipeline #271860 passed

Merge request pipeline passed for f166c9d2

Approval is optional

Merged by GStreamer Marge BotGStreamer Marge Bot 3 years ago (Feb 17, 2021 3:40am UTC)

Merge details

  • Changes merged into master with f166c9d2.
  • Deleted the source branch.

Pipeline #271869 waiting for manual action

Pipeline waiting for manual action for f166c9d2 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
Please register or sign in to reply
Loading