Opened 8 years ago

Closed 8 years ago

#10155 closed Patch - Bug Fix (fixed)

Flash video streaming with newer Firefox versions

Reported by: Peter Townsend <elpinkus@…> 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)

round_off_content_length.patch (595 bytes) - added by Peter Townsend <elpinkus@…> 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Peter Townsend <elpinkus@…>

comment:1 Changed 8 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: newclosed

Correct appearance of float content lengths in flv streaming.

Fixes #10155

Signed-off-by: Raymond Wagner <rwagner@…>

Branch: master Changeset: 39660a7d79b728e2d40361ddb54b947da5b0711c

Note: See TracTickets for help on using tickets.