static const size_t MAX_PACKETS_SIZE = 16 * 1000000;\r
static const size_t MAX_PACKETS_COUNT = 50;\r
\r
-struct input::implementation : public Concurrency::agent, boost::noncopyable\r
+struct input::implementation : public Concurrency::agent\r
+ , public std::enable_shared_from_this<implementation>\r
+ , boost::noncopyable\r
{\r
input::target_t& target_;\r
\r
++packets_count_;\r
packets_size_ += size;\r
\r
- packet = safe_ptr<AVPacket>(packet.get(), [=](AVPacket*)\r
+ auto self = shared_from_this();\r
+ packet = safe_ptr<AVPacket>(packet.get(), [this, self, packet, size, data](AVPacket*)\r
{\r
packet->size = size;\r
packet->data = data;\r