<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've found the bug that cause mplayer crashed when play mkv file on macosx:)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>In source file libmpdemux/demux_mkv.c</DIV><DIV>in function </DIV><DIV>static void</DIV><DIV>handle_realvideo (demuxer_t *demuxer, mkv_track_t *track, uint8_t *buffer,</DIV><DIV>                  uint32_t size, int block_bref)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the following codes will cause wrong value in macosx and make mplayer crashes:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier New" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;"><B>memcpy (dp-&gt;buffer + sizeof(*hdr) + isize, buffer, (chunks+1)*8);</B></SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>i think it is because that the MacOSX system is big-endian and the mkv file is created in small-endian system such as windows,linux. So when memcpy copy buffer to dp-&gt;buffer use bytes copy, the value of chunks has changed!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="STSong" size="4" style="font: 13.0px STSong"><SPAN class="Apple-converted-space"><SPAN class="Apple-converted-tab">                                </SPAN></SPAN>Yours Sincerely</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="STSong" size="4" style="font: 13.0px STSong"><SPAN class="Apple-converted-space"><SPAN class="Apple-converted-tab">                            </SPAN>         </SPAN>Qing Wang</FONT></P>  </DIV><BR></BODY></HTML>