diff options
author | Aman Gupta <aman@tmm1.net> | 2019-08-26 15:17:43 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2019-09-02 15:06:45 -0700 |
commit | bad8365b2bc6530b65d244c5acaacc14e91b34d9 (patch) | |
tree | 35eb6637acd00342f56ed91fe40371fe23740a4d | |
parent | 6852b85020cf50a3a858e78b2b0e1539d7bc1eef (diff) | |
download | ffmpeg-bad8365b2bc6530b65d244c5acaacc14e91b34d9.tar.gz |
avcodec/v4l2_context: return {decoder,encoder}_cmd errors
Signed-off-by: Aman Gupta <aman@tmm1.net>
-rw-r--r-- | libavcodec/v4l2_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index 4958c634bf..3e180e46b1 100644 --- a/libavcodec/v4l2_context.c +++ b/libavcodec/v4l2_context.c @@ -226,6 +226,8 @@ static int v4l2_stop_decode(V4L2Context *ctx) /* DECODER_CMD is optional */ if (errno == ENOTTY) return ff_v4l2_context_set_status(ctx, VIDIOC_STREAMOFF); + else + return AVERROR(errno); } return 0; @@ -244,6 +246,8 @@ static int v4l2_stop_encode(V4L2Context *ctx) /* ENCODER_CMD is optional */ if (errno == ENOTTY) return ff_v4l2_context_set_status(ctx, VIDIOC_STREAMOFF); + else + return AVERROR(errno); } return 0; |