mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
BugFix Buffer reset to be ready for reload
This commit is contained in:
@@ -802,8 +802,10 @@ void MediaPlayer::close()
|
||||
// cleanup eventual remaining frame memory
|
||||
for(guint i = 0; i < N_VFRAME; i++) {
|
||||
frame_[i].access.lock();
|
||||
if (frame_[i].buffer)
|
||||
if (frame_[i].buffer) {
|
||||
gst_buffer_unref(frame_[i].buffer);
|
||||
frame_[i].buffer = NULL;
|
||||
}
|
||||
frame_[i].status = INVALID;
|
||||
frame_[i].access.unlock();
|
||||
}
|
||||
|
||||
@@ -424,8 +424,10 @@ void Stream::close()
|
||||
// cleanup eventual remaining frame memory
|
||||
for(guint i = 0; i < N_FRAME; ++i){
|
||||
frame_[i].access.lock();
|
||||
if (frame_[i].buffer)
|
||||
if (frame_[i].buffer) {
|
||||
gst_buffer_unref(frame_[i].buffer);
|
||||
frame_[i].buffer = NULL;
|
||||
}
|
||||
frame_[i].status = INVALID;
|
||||
frame_[i].access.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user