mirror of https://git.ffmpeg.org/ffmpeg.git
Revert "v4l2: setting device parameters early"
This reverts commitb1ad931233
. Fixes Ticket #3517 Requested-by: Giorgio Vazzana <mywing81@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit6f21fb7932
) Conflicts: libavdevice/v4l2.c
This commit is contained in:
parent
2be7d565bb
commit
56e11cbe32
|
@ -873,9 +873,6 @@ static int v4l2_read_header(AVFormatContext *ctx)
|
|||
|
||||
avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
|
||||
|
||||
if ((res = v4l2_set_parameters(ctx)) < 0)
|
||||
goto fail;
|
||||
|
||||
if (s->pixel_format) {
|
||||
AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format);
|
||||
|
||||
|
@ -926,6 +923,9 @@ static int v4l2_read_header(AVFormatContext *ctx)
|
|||
|
||||
s->frame_format = desired_format;
|
||||
|
||||
if ((res = v4l2_set_parameters(ctx)) < 0)
|
||||
goto fail;
|
||||
|
||||
st->codec->pix_fmt = avpriv_fmt_v4l2ff(desired_format, codec_id);
|
||||
s->frame_size =
|
||||
avpicture_get_size(st->codec->pix_fmt, s->width, s->height);
|
||||
|
|
Loading…
Reference in New Issue