Mercurial > mplayer.hg
diff libmpdemux/tvi_v4l2.c @ 16186:e861f9b7a70e
take into account that VIDIOC_S_FMT might return updated parameters
author | faust3 |
---|---|
date | Sat, 06 Aug 2005 19:45:55 +0000 |
parents | 973b82bf1187 |
children | 67a685497d21 |
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l2.c Sat Aug 06 18:19:58 2005 +0000 +++ b/libmpdemux/tvi_v4l2.c Sat Aug 06 19:45:55 2005 +0000 @@ -590,6 +590,9 @@ info.short_name, strerror(errno)); return TVI_CONTROL_FALSE; } + /* according to the v4l2 specs VIDIOC_S_FMT should not fail, inflexible drivers + might even always return the default parameters -> update the format here*/ + priv->mp_format = fcc_vl2mp(priv->format.fmt.pix.pixelformat); return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_WIDTH: if (getfmt(priv) < 0) return TVI_CONTROL_FALSE;