diff options
author | James Almer <jamrial@gmail.com> | 2021-08-05 12:00:44 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-08-14 23:06:38 -0300 |
commit | 46e4562b3a6d561174812f2f521ae6be6afe4fca (patch) | |
tree | 4d0e9e7509b9a637aaf4b265526dc0d000f4d006 | |
parent | e680c5c344683d4a0d3a8b5c976ca56baf21b8bd (diff) | |
download | ffmpeg-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>
-rw-r--r-- | libavcodec/cbs_bsf.c | 7 |
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"); |