[FFmpeg-devel] lavf/vf_ocr: check ff_set_common_formats() return value

Submitted by Moritz Barsnick on Nov. 1, 2017, 12:30 a.m.

Details

Message ID 20171101003057.GA3266@sunshine.barsnick.net
State Accepted
Commit a0560d0477549eaaa7d002e013bd8376e80873e4
Headers show

Commit Message

Moritz Barsnick Nov. 1, 2017, 12:30 a.m.
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
---

The only remaining unchecked one I could find in lavf. Fixes a warning,
obviously.

 libavfilter/vf_ocr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Steven Liu Nov. 1, 2017, 3:11 a.m.
2017-11-01 8:30 GMT+08:00 Moritz Barsnick <barsnick@gmx.net>:
> Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
> ---
>
> The only remaining unchecked one I could find in lavf. Fixes a warning,
> obviously.
>
>  libavfilter/vf_ocr.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c
> index e003982f05..abfff49438 100644
> --- a/libavfilter/vf_ocr.c
> +++ b/libavfilter/vf_ocr.c
> @@ -90,9 +90,7 @@ static int query_formats(AVFilterContext *ctx)
>      AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
>      if (!fmts_list)
>          return AVERROR(ENOMEM);
> -    ff_set_common_formats(ctx, fmts_list);
> -
> -    return 0;
> +    return ff_set_common_formats(ctx, fmts_list);
>  }
>
>  static int filter_frame(AVFilterLink *inlink, AVFrame *in)
> --
> 2.13.6
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

LGTM

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c
index e003982f05..abfff49438 100644
--- a/libavfilter/vf_ocr.c
+++ b/libavfilter/vf_ocr.c
@@ -90,9 +90,7 @@  static int query_formats(AVFilterContext *ctx)
     AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
     if (!fmts_list)
         return AVERROR(ENOMEM);
-    ff_set_common_formats(ctx, fmts_list);
-
-    return 0;
+    return ff_set_common_formats(ctx, fmts_list);
 }
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *in)