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
1 changed files with 4 additions and 0 deletions

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;