Mercurial > libavcodec.hg
changeset 9386:a673af90ed8f libavcodec
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.
author | reimar |
---|---|
date | Fri, 10 Apr 2009 14:30:04 +0000 |
parents | 6cd9e789dd9e |
children | cd207441ca56 |
files | h264.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Fri Apr 10 11:33:14 2009 +0000 +++ b/h264.c Fri Apr 10 14:30:04 2009 +0000 @@ -1989,7 +1989,7 @@ 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]);