[FFmpeg-devel] [PATCH 3/3] avcodec/h264dec: Constify slices' pointer to the parent context
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Mar 24 22:21:51 EET 2022
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.rheinhardt at 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
More information about the ffmpeg-devel
mailing list