Commit 4db291d7 authored by Marton Balint's avatar Marton Balint

avfilter/f_cue: always check the return value of ff_inlink_consume_frame

Fixes Coverity CID 1439936.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent b1504e77
...@@ -51,7 +51,9 @@ static int activate(AVFilterContext *ctx) ...@@ -51,7 +51,9 @@ static int activate(AVFilterContext *ctx)
} }
if (s->status == 1) { if (s->status == 1) {
if (pts - s->first_pts < s->preroll) { 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); return ff_filter_frame(outlink, frame);
} }
s->first_pts = pts; s->first_pts = pts;
...@@ -70,7 +72,9 @@ static int activate(AVFilterContext *ctx) ...@@ -70,7 +72,9 @@ static int activate(AVFilterContext *ctx)
s->status++; s->status++;
} }
if (s->status == 4) { 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); return ff_filter_frame(outlink, frame);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment