MediaPlayer: Quit the VideoProducer when we reach the last buffer.
Fixes #13622. The "media_node_framework" is such a huge mess. We really should sit down and design a MediaKit2 someday that doesn't require ~15,000 lines of media node support code just to have a "fully functioning media player."
This commit is contained in:
parent
1fb7ddbb1e
commit
6c73846a03
@ -762,12 +762,13 @@ VideoProducer::_FrameGeneratorThread()
|
||||
err = B_OK;
|
||||
}
|
||||
// clean the buffer if something went wrong
|
||||
if (err != B_OK) {
|
||||
if (err != B_OK && err != B_LAST_BUFFER_ERROR) {
|
||||
// TODO: should use "back value" according
|
||||
// to color space!
|
||||
memset(buffer->Data(), 0, h->size_used);
|
||||
err = B_OK;
|
||||
}
|
||||
} else if (err == B_LAST_BUFFER_ERROR)
|
||||
running = false;
|
||||
// Send the buffer on down to the consumer
|
||||
if (wasCached || (err = SendBuffer(buffer, fOutput.source,
|
||||
fOutput.destination) != B_OK)) {
|
||||
|
Loading…
Reference in New Issue
Block a user