Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72038
b: refs/heads/master
c: 34ca7d3
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 22, 2007
1 parent b821b90 commit 5f066bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 6659e3ed559db2e730947268f9d57869b7a9016c
refs/heads/master: 34ca7d3791c6a467ff6810a149bdf78be086c23a
13 changes: 8 additions & 5 deletions trunk/drivers/media/video/ivtv/ivtv-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,

/* set window size */
if (fmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
struct cx2341x_mpeg_params *p = &itv->params;
int w = fmt->fmt.pix.width;
int h = fmt->fmt.pix.height;

Expand All @@ -566,17 +567,19 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
fmt->fmt.pix.width = w;
fmt->fmt.pix.height = h;

if (!set_fmt || (itv->params.width == w && itv->params.height == h))
if (!set_fmt || (p->width == w && p->height == h))
return 0;
if (atomic_read(&itv->capturing) > 0)
return -EBUSY;

itv->params.width = w;
itv->params.height = h;
p->width = w;
p->height = h;
if (w != 720 || h != (itv->is_50hz ? 576 : 480))
itv->params.video_temporal_filter = 0;
p->video_temporal_filter = 0;
else
itv->params.video_temporal_filter = 8;
p->video_temporal_filter = 8;
if (p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1)
fmt->fmt.pix.width /= 2;
itv->video_dec_func(itv, VIDIOC_S_FMT, fmt);
return ivtv_get_fmt(itv, streamtype, fmt);
}
Expand Down

0 comments on commit 5f066bb

Please sign in to comment.