History

avfilter/f_ebur128: check if frame clone is set

Paul B Mahol committed 6 years ago

Commit cc752231 parent c43f8ba1 file · +5 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/f_ebur128.c+5−1
@@ -774,6 +774,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 773 unmodified lines
774774
775775 /* push one video frame */
776776 if (ebur128->do_video) {
777+ AVFrame *clone;
777778 int x, y, ret;
778779 uint8_t *p;
779780 double gauge_value;
@@ -823,7 +824,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 43 unmodified lines
823824
824825 /* set pts and push frame */
825826 pic->pts = pts;
826− ret = ff_filter_frame(outlink, av_frame_clone(pic));
827+ clone = av_frame_clone(pic);
828+ if (!clone)
829+ return AVERROR(ENOMEM);
830+ ret = ff_filter_frame(outlink, clone);
827831 if (ret < 0)
828832 return ret;
829833 }

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