Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Merge requests
  • !291

Frame: Refined corruption detection.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/Litterfeldt/master into master Mar 15, 2018
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: Litterfeldt

Found that previous code was incomplete and did not properly detect frame corruption during decoding

> i'm decoding video stream using ffmpeg, what i want to do is to check if
> the picture is broken when a frame is decoded by
> avcodec_decode_video2(). i call av_frame_get_decode_error_flags() on
> decoded frame to get the errflags, but it returned 0 all the time. am i
> calling the right function to get what i want? what's the right way to
> check integrity of a decoded picture?

You need to check

- return value of avcodec_decode_video2 (or avcodec_send_packet/receive_frame)
- if you have a frame, then check
      - frame->decode_error_flags (any nonzero value means error)
      - frame->flags & AV_FRAME_FLAG_CORRUPT (some codecs set this and not the decode_error_flags)

I am afraid not all codecs properly report all failed decodings, but
patches are welcome, if you find a decode error without signalling it in
at least one way of the above three...

int AVFrame::decode_error_flags reference

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Litterfeldt/master