1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00

avcodec/v4l2_context: return {decoder,encoder}_cmd errors

Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
Aman Gupta 2019-08-26 15:17:43 -07:00
parent 6852b85020
commit bad8365b2b

View File

@ -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;