videorec: Fix flushing encoders
When passing NULL frames, encoders empty their queues, but we have
to stop polling from them when they don't any more data.
AAABSnicJc7ZDoQwDEPRQJcwC/DDU6kf3oix45cDUuWr+LBhPnzY8TOCP48npoeFGdnA3AKfXexhRZSwKmpYEy2si04QeDCbxq1xtonCVFKZShpTSWcqwSEuEPDF0xaiFznBPBcevgLlj0D5LVB+CZQP0QkCN2bz4vbi7BSFqaQylTSmks5UwqsEAn+uK4bq