From 7193dbf2d47df0d9e317d41543292004940cc047 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Wed, 28 Feb 2018 12:43:33 +0100 Subject: [PATCH 1/1] am7xxx-play: don't override return value when there is a usable one Don't override the avcodec_open2() return value, we can pass along the negative return value as is to the caller. --- examples/am7xxx-play.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/am7xxx-play.c b/examples/am7xxx-play.c index 2d1ef48..b4356ea 100644 --- a/examples/am7xxx-play.c +++ b/examples/am7xxx-play.c @@ -126,7 +126,6 @@ static int video_input_init(struct video_input_ctx *input_ctx, ret = avcodec_open2(input_codec_ctx, input_codec, NULL); if (ret < 0) { fprintf(stderr, "cannot open input codec\n"); - ret = -EINVAL; goto cleanup; } -- 2.1.4