Commit b25016b9 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/gpu/h264_decoder: work around seeking bug with Youtube app

The Youtube Android app will sometimes send an invalid frame number
after seeking, which triggers an error with the H264Decoder. Until this
is fixed, this workaround prevents decoding from failing every second
seek.

BUG=b:146914440
BUG=b:129119729
TEST=Can seek without issue or artefacts in the Android Youtube app on
Krane.

Change-Id: I8b6ca5f4c53a67e934c918023ab987e7a0009ffb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000258
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732728}
parent 0d8fbe9b
...@@ -1127,7 +1127,12 @@ bool H264Decoder::HandleFrameNumGap(int frame_num) { ...@@ -1127,7 +1127,12 @@ bool H264Decoder::HandleFrameNumGap(int frame_num) {
if (!sps->gaps_in_frame_num_value_allowed_flag) { if (!sps->gaps_in_frame_num_value_allowed_flag) {
DVLOG(1) << "Invalid frame_num: " << frame_num; DVLOG(1) << "Invalid frame_num: " << frame_num;
return false; // TODO(b:129119729, b:146914440): Youtube android app sometimes sends an
// invalid frame number after a seek. The sequence goes like:
// Seek, SPS, PPS, IDR-frame, non-IDR, ... non-IDR with invalid number.
// The only way to work around this reliably is to ignore this error.
// Video playback is not affected, no artefacts are visible.
// return false;
} }
DVLOG(2) << "Handling frame_num gap: " << prev_ref_frame_num_ << "->" DVLOG(2) << "Handling frame_num gap: " << prev_ref_frame_num_ << "->"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment