[FFmpeg-cvslog] Revert "v4l2: setting device parameters early"

Michael Niedermayer git at videolan.org
Sat Nov 8 14:27:39 CET 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Sat Nov  8 12:43:50 2014 +0100| [418e9a6113a75cfa84cda7c05f41fb0108a8f83d] | committer: Carl Eugen Hoyos

Revert "v4l2: setting device parameters early"

This reverts commit b1ad9312331759679a9c956233716a67ae681d89.

Fixes Ticket #3517

Requested-by: Giorgio Vazzana <mywing81 at gmail.com>
Merged-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6f21fb793238ab6a790b94b86084148d99373ddf)

Conflicts:
	libavdevice/v4l2.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=418e9a6113a75cfa84cda7c05f41fb0108a8f83d
---

 libavdevice/v4l2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 96a272c..f2c5ffb 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -871,9 +871,6 @@ static int v4l2_read_header(AVFormatContext *s1)
 
     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) {
         AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format);
 
@@ -925,6 +922,9 @@ static int v4l2_read_header(AVFormatContext *s1)
 
     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);
     s->frame_size =
         avpicture_get_size(st->codec->pix_fmt, s->width, s->height);



More information about the ffmpeg-cvslog mailing list