On 9/29/2020 11:22 AM, James Almer wrote:
Prevents a NULL pointer dereference.
Signed-off-by: James Almer <jamr...@gmail.com>
---
libavcodec/cbs_av1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index c66757125f..aef8cf8e64 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -1043,6 +1043,10 @@ static int cbs_av1_write_obu(CodedBitstreamContext *ctx,
av_buffer_unref(&priv->sequence_header_ref);
priv->sequence_header = NULL;
+ err = ff_cbs_make_unit_refcounted(ctx, unit);
+ if (err < 0)
+ return err;
+
priv->sequence_header_ref = av_buffer_ref(unit->content_ref);
if (!priv->sequence_header_ref)
return AVERROR(ENOMEM);
Will apply.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".