Skip to content

Commit c04b9d9

Browse files
committed
compress/jpegxs: Make out_queue unbounded
Fix hang on exit. Not a proper fix, but good enough for now.
1 parent 94d925a commit c04b9d9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/video_compress/jpegxs.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct state_video_compress_jpegxs {
102102
bool parse_fmt(char *fmt);
103103

104104
synchronized_queue<shared_ptr<struct video_frame>, DEFAULT_POOL_SIZE> in_queue;
105-
synchronized_queue<shared_ptr<struct video_frame>, DEFAULT_POOL_SIZE> out_queue;
105+
synchronized_queue<shared_ptr<struct video_frame>, -1> out_queue;
106106

107107
thread worker_send;
108108
thread worker_get;
@@ -512,7 +512,13 @@ static shared_ptr<video_frame> jpegxs_compress_pop(void *state) {
512512
}
513513

514514
static void jpegxs_compress_done(void *state) {
515-
delete (struct state_video_compress_jpegxs *) state;
515+
auto s = static_cast<state_video_compress_jpegxs *>(state);
516+
{
517+
std::scoped_lock l(s->mtx);
518+
//s->stop = true;
519+
//s->out_queue.pop(true);
520+
}
521+
delete s;
516522
}
517523

518524
static compress_module_info get_jpegxs_module_info() {

0 commit comments

Comments
 (0)