From f0b769c16daafa64720dcba7fa81a9f5255e1d29 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 22 Jul 2015 14:04:20 +0200 Subject: lavc: add a packet side data type for VBV-like parameters --- libavcodec/utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libavcodec/utils.c') diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f3361a016f..d2f4de770b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2369,3 +2369,17 @@ const uint8_t *avpriv_find_start_code(const uint8_t *restrict p, return p + 4; } + +AVCPBProperties *av_cpb_properties_alloc(size_t *size) +{ + AVCPBProperties *props = av_mallocz(sizeof(AVCPBProperties)); + if (!props) + return NULL; + + if (size) + *size = sizeof(*props); + + props->vbv_delay = UINT64_MAX; + + return props; +} -- cgit v1.2.3