Commit b152305b authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Carl Eugen Hoyos

Revert "v4l2: setting device parameters early"

This reverts commit b1ad9312.

Fixes Ticket #3517
Requested-by: 's avatarGiorgio Vazzana <mywing81@gmail.com>
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6f21fb79)

Conflicts:
	libavdevice/v4l2.c
parent a0605792
...@@ -868,9 +868,6 @@ static int v4l2_read_header(AVFormatContext *s1) ...@@ -868,9 +868,6 @@ static int v4l2_read_header(AVFormatContext *s1)
avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
if ((res = v4l2_set_parameters(s1)) < 0)
return res;
if (s->pixel_format) { if (s->pixel_format) {
AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format); AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format);
...@@ -922,6 +919,9 @@ static int v4l2_read_header(AVFormatContext *s1) ...@@ -922,6 +919,9 @@ static int v4l2_read_header(AVFormatContext *s1)
s->frame_format = desired_format; s->frame_format = desired_format;
if ((res = v4l2_set_parameters(s1)) < 0)
return res;
st->codec->pix_fmt = avpriv_fmt_v4l2ff(desired_format, codec_id); st->codec->pix_fmt = avpriv_fmt_v4l2ff(desired_format, codec_id);
s->frame_size = s->frame_size =
avpicture_get_size(st->codec->pix_fmt, s->width, s->height); avpicture_get_size(st->codec->pix_fmt, s->width, s->height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment