Opened 9 years ago
Closed 9 years ago
#10155 closed Patch - Bug Fix (fixed)
Flash video streaming with newer Firefox versions
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | 0.25 |
Component: | Plugin - MythWeb | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Flash video streaming in Mythweb stopped working for me a while ago, I assumed due to changes in MythTV. I discovered by accident that it still worked perfectly in Chrome so I did some digging.
In Firefox 8.0, opening a recording's details page and clicking play produces a 200 Stream Not Found message. Pasting the http://192.168.0.31//mythweb/pl/stream/1080/1320488340.flv URL directly into the address bar makes Firefox produce a Corrupted Content Error page.
According to Google, recent versions of Firefox have started producing this error when HTTP headers are incorrect. I grabbed the headers from Chrome:
HTTP/1.1 200 OK Date: Mon, 07 Nov 2011 01:47:16 GMT Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 Content-length: 10583285948.55 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: video/x-flv
The decimal point on the content-length jumped out at me as iffy, that's supposed to be the number of bytes. That seems to be generated in mythweb/modules/stream/stream_flv.pl, line 145:
$size = 1.05*int($lengthSec*($vbitrate*1024+$abitrate*1024)/8);
Moving the multiplication into the int() so the calculation would produce whole numbers made streaming in Firefox work for me again.
$size = int(1.05*$lengthSec*($vbitrate*1024+$abitrate*1024)/8);
Checking in Chrome, I now get:
Content-length: 10583285948
Patch attached.
Attachments (1)
Change History (2)
Changed 9 years ago by
Attachment: | round_off_content_length.patch added |
---|
comment:1 Changed 9 years ago by
Milestone: | unknown → 0.25 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Correct appearance of float content lengths in flv streaming.
Fixes #10155
Signed-off-by: Raymond Wagner <rwagner@…>