Re: Mplayer plugin on Solaris/SPARC
Kevin DeKorte <[email protected]>
| Newsgroups | gmane.comp.mozilla.mplayerplug-in |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] wrote: > Ah yes, there it is: > > amt = fread(&c, 1, 1, local_td->instance->player); > > > Endian issue. (A char is read but stored in the first byte of "int c"; > fien for little endian but not so fine on big endian.) > > Patch: > > --- ./Source/plugin-threads.cpp.org Wed Aug 1 18:50:11 2007 > +++ ./Source/plugin-threads.cpp Thu Aug 16 17:43:12 2007 > @@ -821,8 +821,10 @@ > > if ((local_td->instance->cancelled == 0) > && (local_td->instance->player != NULL)) { > + char fc; > // c = fgetc(local_td->instance->player); > - amt = fread(&c, 1, 1, local_td->instance->player); > + amt = fread(&fc, 1, 1, local_td->instance->player); > + c = amt == 1 ? fc : EOF; > } else { > c = EOF; > amt = 0; > > Casper Casper, Thanks, I tweaked the patch a little (put the variable declaration up higher so that older compilers won't complain). But otherwise accepted and committed. Kevin - -- Get my public GnuPG key from http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Remi - http://enigmail.mozdev.org iD8DBQFGxHMC6w2kMH0L1dERAi4sAJ9qJkNhJwoTxcBau40nnkcVrGINKQCfQVB7 SXugZbNB2JjXC5cEc3+Gx3U= =Mdy2 -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/