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
3087 3087
3088 while (1) {3088 while (1) {
3089 InputFilter *ifilter;3089 InputFilter *ifilter;
3090 InputFilterPriv *ifp;3090 InputFilterPriv *ifp = NULL;
3091 enum FrameOpaque o;3091 enum FrameOpaque o;
3092 unsigned input_idx = fgt.next_in;3092 unsigned input_idx = fgt.next_in;
3093 3093
@@ -3149,7 +3149,7 @@ read_frames: · 55 unmodified lines
3149 ret = read_frames(fg, &fgt, fgt.frame);3149 ret = read_frames(fg, &fgt, fgt.frame);
3150 if (ret == AVERROR_EOF) {3150 if (ret == AVERROR_EOF) {
3151 av_log(fg, AV_LOG_VERBOSE, "All consumers returned EOF\n");3151 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)
3153 av_log(fg, AV_LOG_INFO, "Total changed input frames dropped : %"PRId64"\n", ifp->nb_dropped);3153 av_log(fg, AV_LOG_INFO, "Total changed input frames dropped : %"PRId64"\n", ifp->nb_dropped);
3154 break;3154 break;
3155 } else if (ret < 0) {3155 } 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