Mercurial > libavcodec.hg
comparison h264.c @ 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 | 828d15d322ed |
children | 141badec76fc |
comparison
equal
deleted
inserted
replaced
9385:6cd9e789dd9e | 9386:a673af90ed8f |
---|---|
1987 h->slice_table= NULL; | 1987 h->slice_table= NULL; |
1988 | 1988 |
1989 av_freep(&h->mb2b_xy); | 1989 av_freep(&h->mb2b_xy); |
1990 av_freep(&h->mb2b8_xy); | 1990 av_freep(&h->mb2b8_xy); |
1991 | 1991 |
1992 for(i = 0; i < h->s.avctx->thread_count; i++) { | 1992 for(i = 0; i < MAX_THREADS; i++) { |
1993 hx = h->thread_context[i]; | 1993 hx = h->thread_context[i]; |
1994 if(!hx) continue; | 1994 if(!hx) continue; |
1995 av_freep(&hx->top_borders[1]); | 1995 av_freep(&hx->top_borders[1]); |
1996 av_freep(&hx->top_borders[0]); | 1996 av_freep(&hx->top_borders[0]); |
1997 av_freep(&hx->s.obmc_scratchpad); | 1997 av_freep(&hx->s.obmc_scratchpad); |