History

fftools/ffmpeg_filter: ensure ifp is set before dereferencing it

Fixes segfaults since cbbc927a67f142a02bfc5d047c03587599ee5b55.

James Almer committed 1 year ago

Commit fee5b0a1 parent 5dcf5661 file · +2 −2Browse files

Unified · Split

fftools/ffmpeg_filter.c+2−2
@@ -3087,7 +3087,7 @@ static int filter_thread(void *arg) · 3086 unmodified lines
30873087
30883088 while (1) {
30893089 InputFilter *ifilter;
3090− InputFilterPriv *ifp;
3090+ InputFilterPriv *ifp = NULL;
30913091 enum FrameOpaque o;
30923092 unsigned input_idx = fgt.next_in;
30933093
@@ -3149,7 +3149,7 @@ read_frames: · 55 unmodified lines
31493149 ret = read_frames(fg, &fgt, fgt.frame);
31503150 if (ret == AVERROR_EOF) {
31513151 av_log(fg, AV_LOG_VERBOSE, "All consumers returned EOF\n");
3152− if (ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)
3152+ if (ifp && ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)
31533153 av_log(fg, AV_LOG_INFO, "Total changed input frames dropped : %"PRId64"\n", ifp->nb_dropped);
31543154 break;
31553155 } else if (ret < 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t