Restructure how get_buffer works with threads fix_buffer_age
authorAlexander Strange <astrange@ithinksw.com>
Thu, 20 Jan 2011 02:43:31 +0000 (21:43 -0500)
committerAlexander Strange <astrange@ithinksw.com>
Thu, 20 Jan 2011 02:43:31 +0000 (21:43 -0500)
commite5622e99c9608e612e9f386c1711d76ce08268e1
tree065d91617066c5fbf3f129d02e91a78e7eaaa55e
parent2412ad4778734a19638c997d5567f5d53d135a9a
Restructure how get_buffer works with threads

Instead of having decoding threads keep their own buffers, always call
get_buffer with the context of the first decoding thread. This should
be safe because access to internal_buffer/internal_buffer_count is
protected by buffer_mutex inside get_buffer and not done elsewhere.

This makes AVFrame.age usable again, because we're back to only one
thread creating buffers.

[IN PROGRESS]

Currently breaks vp3 regression test and ffplay of vp3.
libavcodec/pthread.c
libavcodec/utils.c