ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/branches/dev-api-4/xvidcore/examples/xvid_encraw.c
(Generate patch)

Comparing trunk/xvidcore/examples/xvid_encraw.c (file contents):
Revision 560 by edgomez, Sat Sep 28 14:26:53 2002 UTC vs.
Revision 561 by edgomez, Sat Sep 28 14:53:40 2002 UTC

# Line 19 | Line 19
19   *  along with this program; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *
22 < * $Id: xvid_encraw.c,v 1.2 2002-09-28 14:26:53 edgomez Exp $
22 > * $Id: xvid_encraw.c,v 1.3 2002-09-28 14:53:40 edgomez Exp $
23   *
24   ****************************************************************************/
25  
# Line 310 | Line 310 | int main(int argc, char *argv[])
310   *                            Main loop
311   ****************************************************************************/
312  
313 +        totalsize = LONG_PACK('M','P','4','U');
314 +        if(*((char *)(&totalsize)) == 'M')
315 +                bigendian = 1;
316 +        else
317 +                bigendian = 0;
318 +
319          if (ARG_SAVEMPEGSTREAM && (ARG_OUTPUTTYPE || ARG_OUTPUTFILE)) {
320  
321                  if (ARG_OUTPUTFILE == NULL && ARG_OUTPUTTYPE)
# Line 324 | Line 330 | int main(int argc, char *argv[])
330  
331                  /* Write header */
332                  if (ARG_OUTPUTTYPE) {
327                        char *ptr;
328                        long test;
333  
334 <                        test = LONG_PACK('M','P','4','U');
331 <                        ptr = (unsigned char *)&test;
332 <                        if(*ptr == 'M')
333 <                                bigendian = 1;
334 <                        else
335 <                                bigendian = 0;
334 >                        long test = LONG_PACK('M','P','4','U');
335  
336                          test = (!bigendian)?SWAP(test):test;
337  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines