History

lavfi: use a new field for automatic buffer copy.

The code currently use cur_buf as the target of the copy, but cur_buf can be cleared by the filter if it has given the reference away or stored it elsewhere as soon as start_frame. The code still relies on the fact that the reference is not destroyed until end_frame. All filters currently follow that condition. An av_assert1() is added to check it; it should at least cause very visible errors in valgrind.

Nicolas George committed 14 years ago

Commit 8ef740c1 parent f8574652 files · +25 −4Browse files

Showing the changes to libavfilter/avfilter.h (1 of 2 files). Show all

Unified · Split

libavfilter/avfilter.h+9−0
@@ -669,6 +669,15 @@ struct AVFilterLink { · 668 unmodified lines
669 * called with more samples, it will split them.669 * called with more samples, it will split them.
670 */670 */
671 int max_samples;671 int max_samples;
672
673 /**
674 * The buffer reference currently being received across the link by the
675 * destination filter. This is used internally by the filter system to
676 * allow automatic copying of buffers which do not have sufficient
677 * permissions for the destination. This should not be accessed directly
678 * by the filters.
679 */
680 AVFilterBufferRef *cur_buf_copy;
672};681};
673 682
674/**683/**

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