Browse Source

pthread: free progress if buffer allocation failed.

Else we run out of progress variables after a few failed buffer
allocations.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.11
Ronald S. Bultje Anton Khirnov 13 years ago
parent
commit
2ee01fbded
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/pthread.c

+ 4
- 0
libavcodec/pthread.c View File

@@ -951,6 +951,10 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
ff_thread_finish_setup(avctx);
}

if (err) {
free_progress(f);
f->thread_opaque = NULL;
}
pthread_mutex_unlock(&p->parent->buffer_mutex);

return err;


Loading…
Cancel
Save