diff mbox series

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

Message ID AS1PR01MB9564BB00446ED41264E643A48F199@AS1PR01MB9564.eurprd01.prod.exchangelabs.com
State Accepted
Commit 50c35d069a0d300d2d30986b277e9ab0c502d661
Headers show
Series [FFmpeg-devel,1/3] avcodec/h264_slice: Fix decoding undamaged input with slices | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Andreas Rheinhardt March 24, 2022, 8:21 p.m. UTC
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@outlook.com>
---
 libavcodec/h264dec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;