summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_internal.h
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-03-04 23:57:40 +0000
committerMark Thompson <sw@jkqxz.net>2017-06-14 22:27:32 +0100
commitd59c6a3aebc20cc64cb7a46401cb55f02f4cbe09 (patch)
tree93d7c8e3cb688736da2b691f14546d86530ac4d4 /libavutil/hwcontext_internal.h
parenta97fb14418fd621defec1ea5cd387953407b180d (diff)
hwcontext: Improve allocation in derived contexts
Use the flags argument of av_hwframe_ctx_create_derived() to pass the mapping flags which will be used on allocation. Also, set the format and hardware context on the allocated frame automatically - the user should not be required to do this themselves. (cherry picked from commit c5714b51aad41fef56dddac1d542e7fc6b984627)
Diffstat (limited to 'libavutil/hwcontext_internal.h')
-rw-r--r--libavutil/hwcontext_internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/hwcontext_internal.h b/libavutil/hwcontext_internal.h
index 0a0c4e86ce..68f78c0a1f 100644
--- a/libavutil/hwcontext_internal.h
+++ b/libavutil/hwcontext_internal.h
@@ -121,6 +121,11 @@ struct AVHWFramesInternal {
* context it was derived from.
*/
AVBufferRef *source_frames;
+ /**
+ * Flags to apply to the mapping from the source to the derived
+ * frame context when trying to allocate in the derived context.
+ */
+ int source_allocation_map_flags;
};
typedef struct HWMapDescriptor {