Index: mythplugins/mythweb/modules/stream/stream_mp4.pl
===================================================================
--- mythplugins/mythweb/modules/stream/stream_mp4.pl	(revision 20036)
+++ mythplugins/mythweb/modules/stream/stream_mp4.pl	(working copy)
@@ -51,7 +51,7 @@
     binmode DATA;
 
     my $start      = 0;
-    my $end        = $size;
+    my $end        = $size-1;
     my $total_size = $size;
     my $read_size  = 1024;
     my $mtime      = (stat($filename))[9];
@@ -71,8 +71,10 @@
     if ($ENV{'HTTP_RANGE'}) {
     # Figure out the size of the requested chunk
         ($start, $end) = $ENV{'HTTP_RANGE'} =~ /bytes\W+(\d*)-(\d*)\W*$/;
-        if ($end < 1 || $end > $size) {
-            $end = $size;
+        $start ||= 0;
+        $end ||= 0;
+        if ($end < 1 || $end >= $size) {
+            $end = $size-1;
         }
         $size = $end - $start+1;
         if ($read_size > $size) {
Index: mythplugins/mythweb/modules/stream/stream_raw.pl
===================================================================
--- mythplugins/mythweb/modules/stream/stream_raw.pl	(revision 20036)
+++ mythplugins/mythweb/modules/stream/stream_raw.pl	(working copy)
@@ -57,16 +57,17 @@
 
 # Requested a range?
     my $start      = 0;
-    my $end        = $size;
+    my $end        = $size-1;
     my $total_size = $size;
     if ($ENV{'HTTP_RANGE'}) {
     # Figure out the size of the requested chunk
         ($start, $end) = $ENV{'HTTP_RANGE'} =~ /bytes\W+(\d*)-(\d*)\W*$/;
         $start ||= 0;
-        if ($end < 1 || $end > $size) {
-            $end = $size;
+        $end ||= 0;
+        if ($end < 1 || $end >= $size) {
+            $end = $size-1;
         }
-        $size = $end - $start;
+        $size = $end - $start+1;
     }
 
 # Print the header
