diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-10 14:30:04 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-10 14:30:04 +0000 |
commit | 6752dd5aeeca9b6180d9fe0827fd438af426556e (patch) | |
tree | 59a77277223bc2c473759c63b11d2cbdd444ff50 /libavcodec/h264.c | |
parent | ede0e475070298e2bc85870c08c74b33982110dd (diff) | |
download | ffmpeg-6752dd5aeeca9b6180d9fe0827fd438af426556e.tar.gz |
Loop up to MAX_THREADS instead of h->s.avctx->thread_count to free the thread
contexts, this avoids a crash when freeing the H.264 parser context introduced in
r18406, since h->s.avctx is NULL there.
Originally committed as revision 18418 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 99dd52b0c9..b3c01a9ffb 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1989,7 +1989,7 @@ static void free_tables(H264Context *h){ av_freep(&h->mb2b_xy); av_freep(&h->mb2b8_xy); - for(i = 0; i < h->s.avctx->thread_count; i++) { + for(i = 0; i < MAX_THREADS; i++) { hx = h->thread_context[i]; if(!hx) continue; av_freep(&hx->top_borders[1]); |