MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / cbs_h266_replace_sps

Function cbs_h266_replace_sps

libavcodec/cbs_h266.c:374–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372cbs_h266_replace_ps(PPS, pps, pps_pic_parameter_set_id)
373
374static int cbs_h266_replace_sps(CodedBitstreamContext *ctx,
375 CodedBitstreamUnit *unit)
376{
377 CodedBitstreamH266Context *priv = ctx->priv_data;
378 H266RawSPS *sps = unit->content;
379 unsigned int id = sps->sps_seq_parameter_set_id;
380 int err = ff_cbs_make_unit_refcounted(ctx, unit);
381 if (err < 0)
382 return err;
383 av_assert0(unit->content_ref);
384 if (priv->sps[id] && memcmp(priv->sps[id], unit->content_ref, sizeof(*priv->sps[id]))) {
385 for (unsigned int i = 0; i < VVC_MAX_PPS_COUNT; i++) {
386 if (priv->pps[i] && priv->pps[i]->pps_seq_parameter_set_id == id)
387 av_refstruct_unref(&priv->pps[i]);
388 }
389 }
390 av_refstruct_replace(&priv->sps[id], unit->content_ref);
391 return 0;
392}
393
394static int cbs_h266_replace_ph(CodedBitstreamContext *ctx,
395 CodedBitstreamUnit *unit,

Callers 2

cbs_h266_read_nal_unitFunction · 0.85
cbs_h266_write_nal_unitFunction · 0.85

Calls 2

av_refstruct_unrefFunction · 0.85
av_refstruct_replaceFunction · 0.85

Tested by

no test coverage detected