diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-12-20 16:08:57 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2011-12-22 13:09:42 +0400 |
commit | 386aee6864c5cfc438785d2421b2f056450da014 (patch) | |
tree | b18e4771036f3dc6bd01271a7fa4d6c7bc1197d7 /libavfilter/internal.h | |
parent | ab6603b1d8d7d15542a9e1bafa580c4f3798c428 (diff) |
sink_buffer: copy list of provided formats in the context
A list of formats may have been dynamically created by the calling code,
and thus should not be referenced by the sink buffer context.
Avoid possible invalid data reference.
Diffstat (limited to 'libavfilter/internal.h')
-rw-r--r-- | libavfilter/internal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 9f28a839df..227fe6243d 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -69,6 +69,18 @@ void ff_avfilter_default_free_buffer(AVFilterBuffer *buf); /** Tell is a format is contained in the provided list terminated by -1. */ int ff_fmt_is_in(int fmt, const int *fmts); +/** + * Return a copy of a list of integers terminated by -1, or NULL in + * case of copy failure. + */ +int *ff_copy_int_list(const int * const list); + +/** + * Return a copy of a list of 64-bit integers, or NULL in case of + * copy failure. + */ +int64_t *ff_copy_int64_list(const int64_t * const list); + /* Functions to parse audio format arguments */ /** |