[FFmpeg-cvslog] lavc/v4l2_context: Change the type of the ioctl cmd to uint32_t.

Carl Eugen Hoyos git at videolan.org
Sun Nov 5 20:26:11 EET 2017


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun Nov  5 01:53:49 2017 +0100| [2cc51d5025c976aa268a854df1eec86014512c8c] | committer: Carl Eugen Hoyos

lavc/v4l2_context: Change the type of the ioctl cmd to uint32_t.

Fixes a warning on recent Linux:
libavcodec/v4l2_context.c: In function 'ff_v4l2_context_set_status':
libavcodec/v4l2_context.c:496:26: warning: comparison is always false due to limited range of data type

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

 libavcodec/v4l2_context.c | 2 +-
 libavcodec/v4l2_context.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index 9f3b56ddab..4c169928fa 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -484,7 +484,7 @@ static int v4l2_get_coded_format(V4L2Context* ctx, uint32_t *p)
   *
   *****************************************************************************/
 
-int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd)
+int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd)
 {
     int type = ctx->type;
     int ret;
diff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h
index 503cc36dc4..632f1d0aac 100644
--- a/libavcodec/v4l2_context.h
+++ b/libavcodec/v4l2_context.h
@@ -135,7 +135,7 @@ void ff_v4l2_context_release(V4L2Context* ctx);
  *                those frames will be dropped.
  * @return 0 in case of success, a negative value representing the error otherwise.
  */
-int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd);
+int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd);
 
 /**
  * Dequeues a buffer from a V4L2Context to an AVPacket.



More information about the ffmpeg-cvslog mailing list