Trying to read a mpeg ts stream from a second host over tcp (xine
tcp://2ndhost:port). xine fails to select the ts_demux plugin because
the net_input plugin only reads 1448 bytes into the preview buffer even
when the second host sends 32k bytes of data. The ts_demux plugin needs
at least 2096 bytes to the check if it is a valid ts stream, it wants 11
blocks of 188 bytes which start with 0x47.
The *open_plugin function of the ts_demux plugin reads the header with
the _x_demux_read_header function which in turn only reads the complete
preview buffer of the net_input plugin. In the above case 1448 bytes
which is not enough for 11 blocks and there fore the ts_demux plugin
fails as a valid demuxer.
The following patch solves the problem by modifying the net_plugin_open
function of the net_input plugin to try to read the preview buffer to
it's maximum within 10 read tries. This solved the problem for the above
Signed-off by: Michel Verbraak (michel@...)
From: Darren Salt <linux@yo...> - 2007-10-18 21:51:51
I demand that Michel Verbraak may or may not have written...
> The following patch solves the problem by modifying the net_plugin_open
> function of the net_input plugin to try to read the preview buffer to it's
> maximum within 10 read tries. This solved the problem for the above case.
This patch breaks gxine 0.5.11; however, a fix is in 0.6.0 dev. I'm currently
delaying applying this patch to xine-lib 1.1.x (and because of that, the 1.2
dev branch) because of that breakage and the current lack of a newer gxine
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Use more efficient products. Use less. BE MORE ENERGY EFFICIENT.
"He's just a politician trying to save both his faces..."