diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2014-08-05 13:00:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 16:25:26 -0400 |
commit | f95a6ce16736ac3aca4eda2238ccdf1913f3567f (patch) | |
tree | 04b699736d98bd1f3b57b55ba348f838b1af0393 | |
parent | 2dc546d00c8deb22aac50c8cc0c6293aab975c6b (diff) |
[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>
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index dfecb8602f07..a1080a7728e6 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c | |||
@@ -496,6 +496,7 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, | |||
496 | struct v4l2_format *f) | 496 | struct v4l2_format *f) |
497 | { | 497 | { |
498 | struct coda_ctx *ctx = fh_to_ctx(priv); | 498 | struct coda_ctx *ctx = fh_to_ctx(priv); |
499 | struct v4l2_format f_cap; | ||
499 | int ret; | 500 | int ret; |
500 | 501 | ||
501 | ret = coda_try_fmt_vid_out(file, priv, f); | 502 | 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, | |||
508 | 509 | ||
509 | ctx->colorspace = f->fmt.pix.colorspace; | 510 | ctx->colorspace = f->fmt.pix.colorspace; |
510 | 511 | ||
511 | return ret; | 512 | f_cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
513 | coda_g_fmt(file, priv, &f_cap); | ||
514 | f_cap.fmt.pix.width = f->fmt.pix.width; | ||
515 | f_cap.fmt.pix.height = f->fmt.pix.height; | ||
516 | |||
517 | ret = coda_try_fmt_vid_cap(file, priv, &f_cap); | ||
518 | if (ret) | ||
519 | return ret; | ||
520 | |||
521 | return coda_s_fmt(ctx, &f_cap); | ||
512 | } | 522 | } |
513 | 523 | ||
514 | static int coda_qbuf(struct file *file, void *priv, | 524 | static int coda_qbuf(struct file *file, void *priv, |