History

all: Use av_frame_replace() where appropriate

Andreas Rheinhardt committed 3 years ago

Commit cfa47fd1 parent 048778631 files · +34 −67Browse files

Showing the changes to libavfilter (2 of 31 files). Show all

Unified · Split

2 files
  1. libavfilter/vf_paletteuse.c +1 −2
  2. libavfilter/vsrc_ddagrab.c +1 −2
libavfilter/vf_paletteuse.c+1−2
@@ -781,9 +781,8 @@ static int apply_palette(AVFilterLink *inlink, AVFrame *in, AVFrame **outf) · 780 unmodified lines
781 781
782 set_processing_window(s->diff_mode, s->last_in, in,782 set_processing_window(s->diff_mode, s->last_in, in,
783 s->last_out, out, &x, &y, &w, &h);783 s->last_out, out, &x, &y, &w, &h);
784 av_frame_unref(s->last_in);
785 av_frame_unref(s->last_out);784 av_frame_unref(s->last_out);
786 if ((ret = av_frame_ref(s->last_in, in)) < 0 ||785 if ((ret = av_frame_replace(s->last_in, in)) < 0 ||
787 (ret = av_frame_ref(s->last_out, out)) < 0 ||786 (ret = av_frame_ref(s->last_out, out)) < 0 ||
788 (ret = ff_inlink_make_frame_writable(inlink, &s->last_in)) < 0) {787 (ret = ff_inlink_make_frame_writable(inlink, &s->last_in)) < 0) {
789 av_frame_free(&out);788 av_frame_free(&out);
libavfilter/vsrc_ddagrab.c+1−2
@@ -1076,8 +1076,7 @@ static int ddagrab_request_frame(AVFilterLink *outlink) · 1075 unmodified lines
1076 goto fail;1076 goto fail;
1077 }1077 }
1078 1078
1079 av_frame_unref(dda->last_frame);1079 ret = av_frame_replace(dda->last_frame, frame);
1080 ret = av_frame_ref(dda->last_frame, frame);
1081 if (ret < 0)1080 if (ret < 0)
1082 return ret;1081 return ret;
1083 1082

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