Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113909
b: refs/heads/master
c: effc346
h: refs/heads/master
i:
  113907: 939d3c1
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent fae874a commit 5cb34c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff5f26b40ab43a6c263834665bfa10d6114a27cd
refs/heads/master: effc3466d32108bec7da19aa23c1fddee9cafbab
6 changes: 3 additions & 3 deletions trunk/drivers/media/video/cx18/cx18-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ static int cx18_try_fmt_vid_cap(struct file *file, void *fh,
{
struct cx18_open_id *id = fh;
struct cx18 *cx = id->cx;

int w = fmt->fmt.pix.width;
int h = fmt->fmt.pix.height;

Expand Down Expand Up @@ -203,8 +202,7 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
struct cx18_open_id *id = fh;
struct cx18 *cx = id->cx;
int ret;
int w = fmt->fmt.pix.width;
int h = fmt->fmt.pix.height;
int w, h;

ret = v4l2_prio_check(&cx->prio, &id->prio);
if (ret)
Expand All @@ -213,6 +211,8 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
ret = cx18_try_fmt_vid_cap(file, fh, fmt);
if (ret)
return ret;
w = fmt->fmt.pix.width;
h = fmt->fmt.pix.height;

if (cx->params.width == w && cx->params.height == h)
return 0;
Expand Down
29 changes: 11 additions & 18 deletions trunk/drivers/media/video/ivtv/ivtv-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,27 +512,20 @@ static int ivtv_try_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_
static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt)
{
struct ivtv_open_id *id = fh;
s32 w, h;
int field;
int ret;
s32 w = fmt->fmt.pix.width;
s32 h = fmt->fmt.pix.height;
int field = fmt->fmt.pix.field;
int ret = ivtv_g_fmt_vid_out(file, fh, fmt);

w = fmt->fmt.pix.width;
h = fmt->fmt.pix.height;
field = fmt->fmt.pix.field;
ret = ivtv_g_fmt_vid_out(file, fh, fmt);
fmt->fmt.pix.width = w;
fmt->fmt.pix.height = h;
if (!ret && id->type == IVTV_DEC_STREAM_TYPE_YUV) {
fmt->fmt.pix.field = field;
if (fmt->fmt.pix.width < 2)
fmt->fmt.pix.width = 2;
if (fmt->fmt.pix.width > 720)
fmt->fmt.pix.width = 720;
if (fmt->fmt.pix.height < 2)
fmt->fmt.pix.height = 2;
if (fmt->fmt.pix.height > 576)
fmt->fmt.pix.height = 576;
w = min(w, 720);
w = max(w, 2);
h = min(h, 576);
h = max(h, 2);
}
fmt->fmt.pix.width = w;
fmt->fmt.pix.height = h;
return ret;
}

Expand Down Expand Up @@ -560,9 +553,9 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f
struct ivtv_open_id *id = fh;
struct ivtv *itv = id->itv;
struct cx2341x_mpeg_params *p = &itv->params;
int ret = ivtv_try_fmt_vid_cap(file, fh, fmt);
int w = fmt->fmt.pix.width;
int h = fmt->fmt.pix.height;
int ret = ivtv_try_fmt_vid_cap(file, fh, fmt);

if (ret)
return ret;
Expand Down

0 comments on commit 5cb34c8

Please sign in to comment.