Modifying the main context by a slice thread is racy;
so constify the pointer to it in H264SliceContext.
The code itself was already compatible with this change.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavcodec/h264dec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 0b9c5784a2..9a1ec1bace 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -168,7 +168,7 @@ typedef struct H264Ref {
 } H264Ref;
 
 typedef struct H264SliceContext {
-    struct H264Context *h264;
+    const struct H264Context *h264;
     GetBitContext gb;
     ERContext *er;
 
-- 
2.32.0

_______________________________________________
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".

Reply via email to