mmsh misses first data block
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmms (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Libmms version 0.3 (apt-get version, Ubuntu Feisty)
Sample link experiencing the problem: mmsh://
Problem: when using libmms (with tool mimms) to obtain the file at this link using mms (port 1755), the file is ok. But when using mmsh (HTTP port 80), the first data block is missing, resulting in a 'missing key frame' error in ffmpeg decode when playing. Both links play fine in VLC (with its own MMS implementation). It looks like a bug in the mmsh implementation.
Details:
It appears that the get_header() function in mmsh.c reads a block of data, first encounters a CHUNK_TYPE_HEADER and then a CHUNK_TYPE_DATA. It saves the data in this->buf, but when mmsh_read() is called, it calls get_media_packet(), which does an io_read() on the socket and it appears to overwrite this->buf. I see there is some mechanism in the code where packet_type is set to 2, indicating that mms_connect_int() has already read a data packet... maybe this mechanism ought to work in this case as well, but it seems it doesn't. I'll have a more detailed look, but thought I'd report the bug.
Fixed in Debian with version 0.3-5.