[FFmpeg-devel,1/3] avfilter/f_cue: always check the return value of ff_inlink_consume_frame

Submitted by Marton Balint on Oct. 7, 2018, 9:02 p.m.

Details

Message ID 20181007210228.16822-1-cus@passwd.hu
State New
Headers show

Commit Message

Marton Balint Oct. 7, 2018, 9:02 p.m.
Fixes Coverity CID 1439936.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavfilter/f_cue.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c
index 9cf710c6d2..b48dfc9d49 100644
--- a/libavfilter/f_cue.c
+++ b/libavfilter/f_cue.c
@@ -51,7 +51,9 @@  static int activate(AVFilterContext *ctx)
         }
         if (s->status == 1) {
             if (pts - s->first_pts < s->preroll) {
-                ff_inlink_consume_frame(inlink, &frame);
+                int ret = ff_inlink_consume_frame(inlink, &frame);
+                if (ret < 0)
+                    return ret;
                 return ff_filter_frame(outlink, frame);
             }
             s->first_pts = pts;
@@ -70,7 +72,9 @@  static int activate(AVFilterContext *ctx)
             s->status++;
         }
         if (s->status == 4) {
-            ff_inlink_consume_frame(inlink, &frame);
+            int ret = ff_inlink_consume_frame(inlink, &frame);
+            if (ret < 0)
+                return ret;
             return ff_filter_frame(outlink, frame);
         }
     }