mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 10:36:45 +07:00
[media] coda: set capture frame size with output S_FMT
This patch makes coda_s_fmt_vid_out propagate the output frame size to the capture side. The GStreamer v4l2videodec only ever calls S_FMT on the output side and then expects G_FMT on the capture side to return a valid format. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
2dc546d00c
commit
f95a6ce167
@ -496,6 +496,7 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv,
|
|||||||
struct v4l2_format *f)
|
struct v4l2_format *f)
|
||||||
{
|
{
|
||||||
struct coda_ctx *ctx = fh_to_ctx(priv);
|
struct coda_ctx *ctx = fh_to_ctx(priv);
|
||||||
|
struct v4l2_format f_cap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = coda_try_fmt_vid_out(file, priv, f);
|
ret = coda_try_fmt_vid_out(file, priv, f);
|
||||||
@ -508,7 +509,16 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv,
|
|||||||
|
|
||||||
ctx->colorspace = f->fmt.pix.colorspace;
|
ctx->colorspace = f->fmt.pix.colorspace;
|
||||||
|
|
||||||
return ret;
|
f_cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
coda_g_fmt(file, priv, &f_cap);
|
||||||
|
f_cap.fmt.pix.width = f->fmt.pix.width;
|
||||||
|
f_cap.fmt.pix.height = f->fmt.pix.height;
|
||||||
|
|
||||||
|
ret = coda_try_fmt_vid_cap(file, priv, &f_cap);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return coda_s_fmt(ctx, &f_cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int coda_qbuf(struct file *file, void *priv,
|
static int coda_qbuf(struct file *file, void *priv,
|
||||||
|
Loading…
Reference in New Issue
Block a user