[MPlayer-dev-eng] PATCH: Make asf_mmst_streaming.c find all stream objects in the header
Jonatan
mythtv at comhem.se
Wed Jun 11 23:32:26 CEST 2008
Hi,
I noticed that the stream selection for MMS didn't work correctly for me, for example on this
clip: mms://wm0.c90805.cdn.qbrick.com/90805/kluster/20080604/080605MITTINATUREN_09UHY6.wmv
In this clip only the two streams with the lowest bitrates are identified in asf_mmst_streaming.c,
resulting in that the server doesn't send the streams with the higher bitrates.
Playing this clip generates the following output:
...
unknown object
file object, packet length = 2888 (2888)
unknown object
unknown object
stream object, stream ID: 1
stream object, stream ID: 4
unknown object
unknown object
data object
mmst packet_length = 2888
Cache size set to 64 KBytes
Cache fill: 0.00% (0 bytes)
ASF file format detected.
[asfheader] Audio stream found, -aid 2
[asfheader] Video stream found, -vid 3
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 4
VIDEO: [WMV3] 384x216 24bpp 1000.000 fps 193.0 kbps (23.6 kbyte/s)
...
The cause of this seems to be that the header parser in asf_mmst_streaming.c skips parts of the
header that contains the two missing stream objects.
The attached patch goes around this by looking for guids at every position in the previously skipped
part of the header.
The code in asfheader.c obviously has no problems finding all the streams so perhaps some of the
code there could be reused in asf_mmst_streaming.c. That is however not something I have been
looking at since the attached patch is so small.
With the patch the output looks like this:
...
file object, packet length = 2888 (2888)
stream object, stream ID: 2
stream object, stream ID: 3
stream object, stream ID: 1
stream object, stream ID: 4
data object
mmst packet_length = 2888
Cache size set to 64 KBytes
Cache fill: 0.00% (0 bytes)
ASF file format detected.
[asfheader] Audio stream found, -aid 2
[asfheader] Video stream found, -vid 3
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 4
VIDEO: [WMV3] 640x360 24bpp 1000.000 fps 736.0 kbps (89.8 kbyte/s)
...
Best regards
/Jonatan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asf_streams.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080611/1e5cc6f5/attachment.bin>
More information about the MPlayer-dev-eng
mailing list