mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 02:04:58 +00:00
lavc/h264: move ff_init_cabac_states() from decode_slice() to ff_h264_decode_init().
This fixes one of the potential races spotted by Helgrind.
This commit is contained in:
parent
7e5496fc41
commit
1e2e2c8095
@ -1112,6 +1112,8 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
|
||||
s->low_delay = 0;
|
||||
}
|
||||
|
||||
ff_init_cabac_states();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3533,7 +3535,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
|
||||
align_get_bits(&s->gb);
|
||||
|
||||
/* init cabac */
|
||||
ff_init_cabac_states();
|
||||
ff_init_cabac_decoder(&h->cabac,
|
||||
s->gb.buffer + get_bits_count(&s->gb) / 8,
|
||||
(get_bits_left(&s->gb) + 7) / 8);
|
||||
|
Loading…
Reference in New Issue
Block a user