mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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>
This commit is contained in:
parent
e680c5c344
commit
46e4562b3a
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user