Commit 354ec21b authored by reimar's avatar reimar

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18418 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 32c73758
...@@ -1989,7 +1989,7 @@ static void free_tables(H264Context *h){ ...@@ -1989,7 +1989,7 @@ static void free_tables(H264Context *h){
av_freep(&h->mb2b_xy); av_freep(&h->mb2b_xy);
av_freep(&h->mb2b8_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]; hx = h->thread_context[i];
if(!hx) continue; if(!hx) continue;
av_freep(&hx->top_borders[1]); av_freep(&hx->top_borders[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment