Fix failure to destroy the J2KEncoder when an encode fails/is cancelled.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Jul 2022 22:03:33 +0000 (00:03 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 14 Jul 2022 22:03:33 +0000 (00:03 +0200)
src/lib/j2k_encoder.cc

index 985708f054a762e4ab6bc468efdf7fd5b2d41bca..53e1c272fea9dacf9f90fac13263b76982d5b293 100644 (file)
@@ -77,7 +77,7 @@ J2KEncoder::~J2KEncoder ()
 void
 J2KEncoder::begin ()
 {
-       auto wp = shared_from_this ();
+       weak_ptr<J2KEncoder> wp = shared_from_this ();
        _server_found_connection = EncodeServerFinder::instance()->ServersListChanged.connect (
                boost::bind (&J2KEncoder::call_servers_list_changed, wp)
                );