[FFmpeg-trac] #2370(avdevice:open): v4l2 should not need ENUMSTD

FFmpeg trac at avcodec.org
Mon Sep 2 14:43:46 CEST 2013


#2370: v4l2 should not need ENUMSTD
-------------------------------------+-------------------------------------
             Reporter:  ubitux       |                    Owner:  holden
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avdevice
              Version:  git-master   |               Resolution:
             Keywords:  v4l2         |               Blocked By:
  regression                         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  1            |
-------------------------------------+-------------------------------------

Comment (by mrlika):

 Patch that fixes the issue:

 {{{
 diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
 index c7cd519..7ada54f 100644
 --- a/libavdevice/v4l2.c
 +++ b/libavdevice/v4l2.c
 @@ -687,6 +687,10 @@ static int v4l2_set_parameters(AVFormatContext *s1)
              standard.index = i;
              if (v4l2_ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {
                  ret = AVERROR(errno);
 +                if (ret == AVERROR(EINVAL)) {
 +                    tpf = &streamparm.parm.capture.timeperframe;
 +                    break;
 +                }
                  av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_ENUMSTD): %s\n",
 av_err2str(ret));
                  return ret;
              }

 }}}

 The patch sent to ffmpeg-devel for review: http://ffmpeg.org/pipermail
 /ffmpeg-devel/2013-September/147793.html

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2370#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list