summaryrefslogtreecommitdiffstats
path: root/libavcodec/cbs_h2645.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-02-11 00:57:46 +0000
committerMark Thompson <sw@jkqxz.net>2018-02-20 22:04:12 +0000
commit7157d959264f3729da463725c6faa580d9394d19 (patch)
tree94c1ac24c11077178f2ea8b9080b8527fb6e6863 /libavcodec/cbs_h2645.c
parent78fa0b9033c0834c049e2aedf71a8c613fed87ab (diff)
downloadffmpeg-streaming-7157d959264f3729da463725c6faa580d9394d19.zip
ffmpeg-streaming-7157d959264f3729da463725c6faa580d9394d19.tar.gz
cbs_h264: Move slice_group_id array out of PPS structure
It's very large, and is only used in some FMO streams.
Diffstat (limited to 'libavcodec/cbs_h2645.c')
-rw-r--r--libavcodec/cbs_h2645.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 25bd33f..ebc0236 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -394,6 +394,13 @@ static int cbs_h2645_read_more_rbsp_data(BitstreamContext *bc)
#undef allocate
+static void cbs_h264_free_pps(void *unit, uint8_t *content)
+{
+ H264RawPPS *pps = (H264RawPPS*)content;
+ av_buffer_unref(&pps->slice_group_id_ref);
+ av_freep(&content);
+}
+
static void cbs_h264_free_sei_payload(H264RawSEIPayload *payload)
{
switch (payload->payload_type) {
@@ -725,7 +732,8 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx,
{
H264RawPPS *pps;
- err = ff_cbs_alloc_unit_content(ctx, unit, sizeof(*pps), NULL);
+ err = ff_cbs_alloc_unit_content(ctx, unit, sizeof(*pps),
+ &cbs_h264_free_pps);
if (err < 0)
return err;
pps = unit->content;
OpenPOWER on IntegriCloud