]> git.sesse.net Git - nageru/commit
When sending original frames, do the reading in the queueing thread.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 15 Jan 2019 17:39:10 +0000 (18:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 15 Jan 2019 17:43:30 +0000 (18:43 +0100)
commit8e88294902b4b6f43c8db83dbf04830b5b9d2bfd
treeae6f8776e1f9a33095866ada9ede1911abc4a2ae
parent2f717d07dd9c87e45e1de6bac6b64d83982f6246
When sending original frames, do the reading in the queueing thread.

Earlier, we'd only preload it and hope the encoder's second read would
come from the cache. But this is more consistent, and perhaps more
importantly, it fixes a race on the FrameReader, where the two threads
would try accessing it at the same time, causing the file descriptor
to be closed while being used, and a crash.

Now, the FrameReaders are consistently accessed from one thread only.
futatabi/frame_on_disk.h
futatabi/video_stream.cpp
futatabi/video_stream.h