Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc

Issue 1369673002: H264Decoder: Handle gaps in frame_num. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
index dafcf7ecf371ad1770bed82e01577491e5ea8200..4d98f2a72ef72aed626f6f54b38d1f5c4a8b25e6 100644
--- a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
@@ -1777,18 +1777,23 @@ void V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::H264DPBToV4L2DPB(
DVLOG(1) << "Invalid DPB size";
break;
}
+
+ int index = VIDEO_MAX_FRAME;
kcwu 2015/10/02 13:06:04 Why it is okay to set buf_idx=VIDEO_MAX_FRAME for
Pawel Osciak 2015/10/09 06:39:25 VIDEO_MAX_FRAME is used to indicate an unused entr
+ if (!pic->nonexisting) {
+ scoped_refptr<V4L2DecodeSurface> dec_surface =
+ H264PictureToV4L2DecodeSurface(pic);
+ index = dec_surface->output_record();
+ ref_surfaces->push_back(dec_surface);
+ }
+
struct v4l2_h264_dpb_entry& entry = v4l2_decode_param_.dpb[i++];
- scoped_refptr<V4L2DecodeSurface> dec_surface =
- H264PictureToV4L2DecodeSurface(pic);
- entry.buf_index = dec_surface->output_record();
+ entry.buf_index = index;
entry.frame_num = pic->frame_num;
entry.pic_num = pic->pic_num;
entry.top_field_order_cnt = pic->top_field_order_cnt;
entry.bottom_field_order_cnt = pic->bottom_field_order_cnt;
entry.flags = (pic->ref ? V4L2_H264_DPB_ENTRY_FLAG_ACTIVE : 0) |
(pic->long_term ? V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM : 0);
-
- ref_surfaces->push_back(dec_surface);
}
}

Powered by Google App Engine
This is Rietveld 408576698