Bug: Streaming transcoded data sends wrong range to flashpla
Hi,
First of all: Sorry I don't know where bug reports have to go.
Anyway I discovered the following bug:
When I stream transcoded files, e.g. wma-files, using the flashplayer, streaming stops in the middle of the song. This happens especially with low bandwith input files (64kbps for example).
I think I've tracked down the Bug to sourcecode-file "StreamController.java"
I'm now referring to the svn-version checked out on 2009-09-20 late evening of StreamController.java:
In lines 122 to 128 of said file:
By Util.setContentLength you tell the player the filesize of the current song. This filesize is the filesize of the original not yet transcoded file.
In line 149
you request transcoding for the file. And later on this transcoded "in" is send to the player. But "in" will have a different filesize than "file". So the player gets confused.
P.S.
This is my first post: I'm really impressed of subsonic!
It's exactly what I had been looking for. Now I can share my entire music collection with everyone in the house and stream it easily to every client, which doesn't need anything but a web-browser. Cool! Keep up the good work!
Best Regards
Daniel Schmitz
First of all: Sorry I don't know where bug reports have to go.
Anyway I discovered the following bug:
When I stream transcoded files, e.g. wma-files, using the flashplayer, streaming stops in the middle of the song. This happens especially with low bandwith input files (64kbps for example).
I think I've tracked down the Bug to sourcecode-file "StreamController.java"
I'm now referring to the svn-version checked out on 2009-09-20 late evening of StreamController.java:
In lines 122 to 128 of said file:
- Code: Select all
if (range != null) {
response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT);
Util.setContentLength(response, file.length() - range.getMinimumLong());
LOG.info("Got range: " + range);
} else {
Util.setContentLength(response, file.length());
}
By Util.setContentLength you tell the player the filesize of the current song. This filesize is the filesize of the original not yet transcoded file.
In line 149
- Code: Select all
in = new PlaylistInputStream(player, status, transcodingService, musicInfoService, audioScrobblerService, searchService);
you request transcoding for the file. And later on this transcoded "in" is send to the player. But "in" will have a different filesize than "file". So the player gets confused.
P.S.
This is my first post: I'm really impressed of subsonic!
Best Regards
Daniel Schmitz