Tighten condition to prevent possible Null Dereference from
access to field 'pts' loaded from variable 'in'.

Signed-off-by: C0deAi <benjamin.ba...@assrc.us>
---
 libavfilter/af_afade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c
index 285b5b6..7f5106e 100644
--- a/libavfilter/af_afade.c
+++ b/libavfilter/af_afade.c
@@ -460,7 +460,7 @@ static int activate(AVFilterContext *ctx)
         return ff_filter_frame(outlink, in);
     }
 
-    if (ff_framequeue_queued_samples(&ctx->inputs[0]->fifo) > s->nb_samples) {
+    if (in && (ff_framequeue_queued_samples(&ctx->inputs[0]->fifo) > 
s->nb_samples)) {
         nb_samples = ff_framequeue_queued_samples(&ctx->inputs[0]->fifo) - 
s->nb_samples;
         if (nb_samples > 0) {
             ret = ff_inlink_consume_samples(ctx->inputs[0], nb_samples, 
nb_samples, &in);
-- 
2.7.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to