Chromium Code Reviews| 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); |
| } |
| } |