History

avfilter/buffersrc: Use av_frame_clone() where appropriate

Andreas Rheinhardt committed 3 years ago

Commit 67cc7aa1 parent 185d0ac1 file · +5 −8Browse files

Unified · Split

libavfilter/buffersrc.c+5−8
@@ -230,17 +230,14 @@ FF_ENABLE_DEPRECATION_WARNINGS · 229 unmodified lines
230 230
231 }231 }
232 232
233 if (!(copy = av_frame_alloc()))
234 return AVERROR(ENOMEM);
235
236 if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {233 if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {
234 if (!(copy = av_frame_alloc()))
235 return AVERROR(ENOMEM);
237 av_frame_move_ref(copy, frame);236 av_frame_move_ref(copy, frame);
238 } else {237 } else {
239 ret = av_frame_ref(copy, frame);238 copy = av_frame_clone(frame);
240 if (ret < 0) {239 if (!copy)
241 av_frame_free(&copy);240 return AVERROR(ENOMEM);
242 return ret;
243 }
244 }241 }
245 242
246#if FF_API_PKT_DURATION243#if FF_API_PKT_DURATION

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