diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-16 17:12:29 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-16 17:12:29 +0000 |
commit | b397b28b31e8a57b71f90ef31dbdafad25fd5820 (patch) | |
tree | c71d0429b5499d92bab4107bef0faa991cda7681 /stream/tv.c | |
parent | 91dd12b122e0877acb93f6829e708353c6d8903e (diff) | |
download | mpv-b397b28b31e8a57b71f90ef31dbdafad25fd5820.tar.bz2 mpv-b397b28b31e8a57b71f90ef31dbdafad25fd5820.tar.xz |
Add TVI_CONTROL_VID_SET_WIDTH_HEIGHT to set width and height together for v4l2,
otherwise some drivers will always stay stuck in the lowest resolution.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28975 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tv.c')
-rw-r--r-- | stream/tv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stream/tv.c b/stream/tv.c index 58321d5302..7e8ae530d4 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -439,6 +439,12 @@ static int open_tv(tvi_handle_t *tvh) #endif /* limits on w&h are norm-dependent -- JM */ + if (tvh->tv_param->width != -1 && tvh->tv_param->height != -1) { + // first tell the driver both width and height, some drivers do not support setting them independently. + int dim[2]; + dim[0] = tvh->tv_param->width; dim[1] = tvh->tv_param->height; + funcs->control(tvh->priv, TVI_CONTROL_VID_SET_WIDTH_HEIGHT, dim); + } /* set width */ if (tvh->tv_param->width != -1) { |