v4l2dec: refine dw logic [1/1]
PD#SWPL-195576
Problem:
It is not reasonable to use the output to determine whether dw is 0,
which will lead to error buffer size.
The capture should be used instead.
Solution:
Use the capture's dw to determine
Verify:
bp201
Change-Id: If71cd884fe10014cee546b74c121f56562b315a6
Signed-off-by: hanghang.luo <hanghang.luo@amlogic.com>
diff --git a/src/gstamlv4l2videodec.c b/src/gstamlv4l2videodec.c
index 0bcfbb0..5a4421e 100644
--- a/src/gstamlv4l2videodec.c
+++ b/src/gstamlv4l2videodec.c
@@ -885,8 +885,8 @@
gst_structure_set(s,"src_height",G_TYPE_INT,height,NULL);
gst_structure_set(s,"width",G_TYPE_INT,info.width,NULL);
gst_structure_set(s,"height",G_TYPE_INT,info.height,NULL);
- gst_structure_set(s,"dw_mode",G_TYPE_INT,self->v4l2output->dw_mode,NULL);
- gst_structure_set(s,"stride",G_TYPE_INT,self->v4l2output->stride,NULL);
+ gst_structure_set(s,"dw_mode",G_TYPE_INT,self->v4l2capture->dw_mode,NULL);
+ gst_structure_set(s,"stride",G_TYPE_INT,self->v4l2capture->stride,NULL);
GST_DEBUG_OBJECT(self, "output_state->caps: %" GST_PTR_FORMAT, output_state->caps);
gst_aml_video_codec_state_unref(output_state);
}