Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skipShortTermRefPicSets in ts/H265Reader #11105

Closed
wants to merge 1 commit into from

Conversation

pengbins
Copy link
Contributor

@pengbins pengbins commented Apr 7, 2023

This PR try to resolve issue androidx/media#303

The attached media file can be played by ffplay, but cause ExoPlayer throw exception during parse the SPS header from skipShortTermRefPicSets.

skipShortTermRefPicSets is a simplified version which only used for parse SPS. The full version see H.265/HEVC 7.3.7. and FFmpeg code and HM code .

There are two bugs (or over-simplified) in the function skipShortTermRefPicSets, which cause this issue:

  1. Should read use_delta_flag[j] when used_by_curr_pic_flag[j] is 0.
  2. NumDeltaPocs in each RefPicSet(RPS) maybe different, previousNumDeltaPocs needs to be updated for predicted RPS too.

Although each RPS always predict from previous one, but the number of deltaPocs of current RPS depends on the values of use_delta_flag[j] and used_by_curr_pic_flag[j]. Currently previousNumDeltaPocs only updated for non-predicted RPS.

@google-cla
Copy link

google-cla bot commented Apr 7, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@icbaker
Copy link
Collaborator

icbaker commented Apr 11, 2023

Closing in favour of androidx/media#313 (we are only accepting new PRs on the androidx/media Github project).

@icbaker icbaker closed this Apr 11, 2023
@google google locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants