ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Thu Aug  5 12:00:44 
2021 -0300| [46e4562b3a6d561174812f2f521ae6be6afe4fca] | committer: James Almer

avcodec/cbs_bsf: use ff_cbs_read_packet_side_data() to parse extradata in 
packet side data

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46e4562b3a6d561174812f2f521ae6be6afe4fca
---

 libavcodec/cbs_bsf.c | 7 ++-----
 1 file 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");

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to