diff --git a/applications/player/src/main.cpp b/applications/player/src/main.cpp
index 78a919a63f4668be19667a456a5567af7c7a3189..0423600c99c2ace5c6fb20ea4910f78b15e65311 100644
--- a/applications/player/src/main.cpp
+++ b/applications/player/src/main.cpp
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
 
     int current_stream = 0;
 
-    bool res = r.read(90000000000000, [&current_stream](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) {
+    bool res = r.read(90000000000000, [&current_stream,&r](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) {
         if (spkt.channel & 0x1 > 0) return;
         if (spkt.streamID == current_stream) {
 
@@ -55,7 +55,12 @@ int main(int argc, char **argv) {
             if (!frame.empty()) {
                 cv::imshow("Player", frame);
             }
-            cv::waitKey(20);
+            int key = cv::waitKey(20);
+            if (key >= 48 && key <= 57) {
+                current_stream = key - 48;
+            } else if (key == 27) {
+                r.end();
+            }
         }
     });
 
diff --git a/components/codecs/include/ftl/codecs/reader.hpp b/components/codecs/include/ftl/codecs/reader.hpp
index 6ec39f6b0a66a3010d05c1203ce4fd26fcb9d5c1..effba8480963761ed64b313949e7f6ed1d231f94 100644
--- a/components/codecs/include/ftl/codecs/reader.hpp
+++ b/components/codecs/include/ftl/codecs/reader.hpp
@@ -45,6 +45,7 @@ class Reader {
 	std::tuple<StreamPacket,Packet> data_;
 	bool has_data_;
 	int64_t timestart_;
+	bool playing_;
 
 	std::vector<std::function<void(const ftl::codecs::StreamPacket &, const ftl::codecs::Packet &)>> handlers_;
 };
diff --git a/components/codecs/src/reader.cpp b/components/codecs/src/reader.cpp
index 5c0d46909e2d7905860aefaa4bfffd598f19bdd6..5ab809b8fb4beb44a0a41151d551a8cdfe3263d6 100644
--- a/components/codecs/src/reader.cpp
+++ b/components/codecs/src/reader.cpp
@@ -9,7 +9,7 @@ using ftl::codecs::StreamPacket;
 using ftl::codecs::Packet;
 using std::get;
 
-Reader::Reader(std::istream &s) : stream_(&s), has_data_(false) {
+Reader::Reader(std::istream &s) : stream_(&s), has_data_(false), playing_(false) {
 
 }
 
@@ -24,6 +24,7 @@ bool Reader::begin() {
 
 	// Capture current time to adjust timestamps
 	timestart_ = ftl::timer::get_time();
+	playing_ = true;
 
 	return true;
 }
@@ -38,7 +39,7 @@ bool Reader::read(int64_t ts, const std::function<void(const ftl::codecs::Stream
 
 	bool partial = false;
 
-	while (stream_->good() || buffer_.nonparsed_size() > 0) {
+	while (playing_ && stream_->good() || buffer_.nonparsed_size() > 0) {
 		if (buffer_.nonparsed_size() == 0 || (partial && buffer_.nonparsed_size() < 10000000)) {
 			buffer_.reserve_buffer(10000000);
 			stream_->read(buffer_.buffer(), buffer_.buffer_capacity());
@@ -97,5 +98,6 @@ void Reader::onPacket(int streamID, const std::function<void(const ftl::codecs::
 }
 
 bool Reader::end() {
+	playing_ = false;
 	return true;
 }