summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_bsf.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-05 12:00:44 -0300
committerJames Almer <jamrial@gmail.com>2021-08-14 23:06:38 -0300
commit46e4562b3a6d561174812f2f521ae6be6afe4fca (patch)
tree4d0e9e7509b9a637aaf4b265526dc0d000f4d006 /libavcodec/cbs_bsf.c
parente680c5c344683d4a0d3a8b5c976ca56baf21b8bd (diff)
downloadffmpeg-46e4562b3a6d561174812f2f521ae6be6afe4fca.tar.gz
avcodec/cbs_bsf: use ff_cbs_read_packet_side_data() to parse extradata in packet side data
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs_bsf.c')
-rw-r--r--libavcodec/cbs_bsf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/cbs_bsf.c b/libavcodec/cbs_bsf.c
index 86ec3f2a4d..069f6e9918 100644
--- a/libavcodec/cbs_bsf.c
+++ b/libavcodec/cbs_bsf.c
@@ -25,15 +25,12 @@ static int cbs_bsf_update_side_data(AVBSFContext *bsf, AVPacket *pkt)
CBSBSFContext *ctx = bsf->priv_data;
CodedBitstreamFragment *frag = &ctx->fragment;
uint8_t *side_data;
- size_t side_data_size;
int err;
- side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
- &side_data_size);
- if (!side_data_size)
+ if (!av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, NULL))
return 0;
- err = ff_cbs_read(ctx->input, frag, side_data, side_data_size);
+ err = ff_cbs_read_packet_side_data(ctx->input, frag, pkt);
if (err < 0) {
av_log(bsf, AV_LOG_ERROR,
"Failed to read extradata from packet side data.\n");