avfilter/af_join: Fix crash in join filter

Previously if ff_outlink_frame_wanted() returned 0 it could dereference a null pointer when trying to read nb_samples.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Nikolas Bowe 2018-02-02 15:11:04 -08:00 committed by Michael Niedermayer
parent e3d946b3f4
commit c86490c49a
1 changed files with 3 additions and 0 deletions

View File

@ -485,6 +485,9 @@ static int activate(AVFilterContext *ctx)
return 0;
}
}
if (!s->input_frames[0]) {
return 0;
}
}
nb_samples = s->input_frames[0]->nb_samples;