[FFmpeg-cvslog] avcodec/h264dec: Constify slices' pointer to the parent context

Andreas Rheinhardt git at videolan.org
Fri Mar 25 20:35:11 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Mar 24 20:49:20 2022 +0100| [50c35d069a0d300d2d30986b277e9ab0c502d661] | committer: Andreas Rheinhardt

avcodec/h264dec: Constify slices' pointer to the parent context

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.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 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;
 



More information about the ffmpeg-cvslog mailing list