PD#SWPL-28501
Problem:
In V4L2 mode, resolution change will trigger reset() and all the
canvas are released with h264_reconfig(). When it continues decoding
the data with new resolution, decoder will write to invalid canvas.
Solution:
In vh264_set_params() call config_buf_specs in V4L2 mode.
Verify:
U212
gst-play-1.0 http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd
Change-Id: Ia57678e91001d719b9477a62fcae7688455decfd
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
if (dstbuf->frame_buffer.num_planes == 2)
kernel_write(fp,vb2_plane_vaddr(vb, 1),
vb->planes[1].bytesused, 0);
+ pr_info("dump idx: %d %dx%d\n", dump_capture_frame, vf->width, vf->height);
+ dump_capture_frame--;
filp_close(fp, NULL);
}
}
mutex_lock(&vmh264_mutex);
if (!hw->mmu_enable) {
- if (!buffer_reset_flag)
+ if (!buffer_reset_flag || hw->is_used_v4l)
config_buf_specs(vdec);
i = get_buf_spec_by_canvas_pos(hw, 0);
hw->eos = 0;
hw->decode_pic_count = 0;
hw->dec_result = DEC_RESULT_NONE;
+ /* v4l will reset on every res change */
+ hw->res_ch_flag = 0;
clear_refer_bufs(hw);
reset_process_time(hw);