am7xxx-play: don't override return value when there is a usable one
authorAntonio Ospite <ao2@ao2.it>
Wed, 28 Feb 2018 11:43:33 +0000 (12:43 +0100)
committerAntonio Ospite <ao2@ao2.it>
Thu, 1 Mar 2018 14:33:27 +0000 (15:33 +0100)
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

index 2d1ef48..b4356ea 100644 (file)
@@ -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;
        }