You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
fftools/ffmpeg_filter: ensure ifp is set before dereferencing it
Fixes segfaults since cbbc927a67
.
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@ -3087,7 +3087,7 @@ static int filter_thread(void *arg)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
InputFilter *ifilter;
|
InputFilter *ifilter;
|
||||||
InputFilterPriv *ifp;
|
InputFilterPriv *ifp = NULL;
|
||||||
enum FrameOpaque o;
|
enum FrameOpaque o;
|
||||||
unsigned input_idx = fgt.next_in;
|
unsigned input_idx = fgt.next_in;
|
||||||
|
|
||||||
@ -3149,7 +3149,7 @@ read_frames:
|
|||||||
ret = read_frames(fg, &fgt, fgt.frame);
|
ret = read_frames(fg, &fgt, fgt.frame);
|
||||||
if (ret == AVERROR_EOF) {
|
if (ret == AVERROR_EOF) {
|
||||||
av_log(fg, AV_LOG_VERBOSE, "All consumers returned EOF\n");
|
av_log(fg, AV_LOG_VERBOSE, "All consumers returned EOF\n");
|
||||||
if (ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)
|
if (ifp && ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)
|
||||||
av_log(fg, AV_LOG_INFO, "Total changed input frames dropped : %"PRId64"\n", ifp->nb_dropped);
|
av_log(fg, AV_LOG_INFO, "Total changed input frames dropped : %"PRId64"\n", ifp->nb_dropped);
|
||||||
break;
|
break;
|
||||||
} else if (ret < 0) {
|
} else if (ret < 0) {
|
||||||
|
Reference in New Issue
Block a user