diff mbox

[FFmpeg-devel] avcodec/v4l2_context: Replace "0 in case of success" by "non negative in case of success"

Message ID 20171004105142.7675-1-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Oct. 4, 2017, 10:51 a.m. UTC
This makes the return code consistent with most of FFmpeg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/v4l2_context.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

wm4 Oct. 4, 2017, 11:20 a.m. UTC | #1
On Wed,  4 Oct 2017 12:51:42 +0200
Michael Niedermayer <michael@niedermayer.cc> wrote:

> This makes the return code consistent with most of FFmpeg
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---

That's a bit redundant because the FFmpeg convention is guaranteed to
work on the caller site anyway.
diff mbox

Patch

diff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h
index 503cc36dc4..63e01dfb89 100644
--- a/libavcodec/v4l2_context.h
+++ b/libavcodec/v4l2_context.h
@@ -97,7 +97,7 @@  typedef struct V4L2Context {
  * Initializes a V4L2Context.
  *
  * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables.
- * @return 0 in case of success, a negative value representing the error otherwise.
+ * @return non negative in case of success, a negative value representing the error otherwise.
  */
 int ff_v4l2_context_init(V4L2Context* ctx);
 
@@ -105,7 +105,7 @@  int ff_v4l2_context_init(V4L2Context* ctx);
  * Sets the V4L2Context format in the v4l2 driver.
  *
  * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables.
- * @return 0 in case of success, a negative value representing the error otherwise.
+ * @return non negative in case of success, a negative value representing the error otherwise.
  */
 int ff_v4l2_context_set_format(V4L2Context* ctx);
 
@@ -113,7 +113,7 @@  int ff_v4l2_context_set_format(V4L2Context* ctx);
  * Queries the driver for a valid v4l2 format and copies it to the context.
  *
  * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables.
- * @return 0 in case of success, a negative value representing the error otherwise.
+ * @return non negative in case of success, a negative value representing the error otherwise.
  */
 int ff_v4l2_context_get_format(V4L2Context* ctx);
 
@@ -133,7 +133,7 @@  void ff_v4l2_context_release(V4L2Context* ctx);
  * @param[in] cmd The status to set (VIDIOC_STREAMON or VIDIOC_STREAMOFF).
  *                Warning: If VIDIOC_STREAMOFF is sent to a buffer context that still has some frames buffered,
  *                those frames will be dropped.
- * @return 0 in case of success, a negative value representing the error otherwise.
+ * @return non negative in case of success, a negative value representing the error otherwise.
  */
 int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd);
 
@@ -143,7 +143,7 @@  int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd);
  * The pkt must be non NULL.
  * @param[in] ctx The V4L2Context to dequeue from.
  * @param[inout] pkt The AVPacket to dequeue to.
- * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.
+ * @return non negative in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.
  */
 int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt);
 
@@ -153,7 +153,7 @@  int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt);
  * The frame must be non NULL.
  * @param[in] ctx The V4L2Context to dequeue from.
  * @param[inout] f The AVFrame to dequeue to.
- * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.
+ * @return non negative in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.
  */
 int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f);
 
@@ -165,7 +165,7 @@  int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f);
  *
  * @param[in] ctx The V4L2Context to enqueue to.
  * @param[in] pkt A pointer to an AVPacket.
- * @return 0 in case of success, a negative error otherwise.
+ * @return non negative in case of success, a negative error otherwise.
  */
 int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt);
 
@@ -176,7 +176,7 @@  int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt);
  *
  * @param[in] ctx The V4L2Context to enqueue to.
  * @param[in] f A pointer to an AVFrame to enqueue.
- * @return 0 in case of success, a negative error otherwise.
+ * @return non negative in case of success, a negative error otherwise.
  */
 int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f);