OSDN Git Service

lavfi: use min_perms and rej_perms for out pads.
authorNicolas George <nicolas.george@normalesup.org>
Sun, 12 Aug 2012 08:59:37 +0000 (10:59 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Tue, 14 Aug 2012 10:00:35 +0000 (12:00 +0200)
commit271ddb116c8a3e0f2a34cedbb906a2883b5289b1
tree01713b5b7e337401957b7818874183fe8be12970
parent67a804b9ac12efbb8e1c84c6716dec77c9120bd1
lavfi: use min_perms and rej_perms for out pads.

There are several reasons for doing that:

1. It documents the code for the reader and helps find
   inconsistencies and bugs.

2. For rej_perms, it guarantees the change will be done
   even if the output reference can be created by several
   code paths.

3. It can be used to predict cases where a copy will,
   or will not happen and optimize buffer allocation
   (for example not request a rare direct-rendering buffer
   from a device sink if it will be copied anyway).

Note that a filter is still allowed to manage the permissions
on its own without using these fields.
libavfilter/audio.c
libavfilter/avfilter.h
libavfilter/video.c