From 9b1ec248350405e1da64eecad620a8d7a4ee6caa Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 23 Jan 2018 09:41:29 +0100 Subject: [PATCH] avcodec: v4l2_context: remove unnecessary code Fixes CID 1418358 Signed-off-by: Jorge Ramirez-Ortiz --- libavcodec/v4l2_context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index e0431b1b3e..efcb0426e4 100644 --- a/libavcodec/v4l2_context.c +++ b/libavcodec/v4l2_context.c @@ -446,9 +446,7 @@ static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p) if (pixfmt != AV_PIX_FMT_NONE) { ret = v4l2_try_raw_format(ctx, pixfmt); - if (ret) - pixfmt = AV_PIX_FMT_NONE; - else + if (!ret) return 0; }