[svn] / branches / dev-api-4 / xvidcore / examples / xvid_encraw.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/examples/xvid_encraw.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 558, Sat Sep 28 14:26:53 2002 UTC revision 566, Sat Sep 28 16:01:15 2002 UTC
# Line 19  Line 19 
19   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  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 $   * $Id: xvid_encraw.c,v 1.4 2002-09-28 16:01:15 edgomez Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 36  Line 36 
36    
37  #include <stdio.h>  #include <stdio.h>
38  #include <stdlib.h>  #include <stdlib.h>
39    #include <string.h>
40  #include <math.h>  #include <math.h>
41  #ifndef _MSC_VER  #ifndef _MSC_VER
42  #include <sys/time.h>  #include <sys/time.h>
# Line 310  Line 311 
311   *                            Main loop   *                            Main loop
312   ****************************************************************************/   ****************************************************************************/
313    
314            totalsize = LONG_PACK('M','P','4','U');
315            if(*((char *)(&totalsize)) == 'M')
316                    bigendian = 1;
317            else
318                    bigendian = 0;
319    
320          if (ARG_SAVEMPEGSTREAM && (ARG_OUTPUTTYPE || ARG_OUTPUTFILE)) {          if (ARG_SAVEMPEGSTREAM && (ARG_OUTPUTTYPE || ARG_OUTPUTFILE)) {
321    
322                  if (ARG_OUTPUTFILE == NULL && ARG_OUTPUTTYPE)                  if (ARG_OUTPUTFILE == NULL && ARG_OUTPUTTYPE)
# Line 324  Line 331 
331    
332                  /* Write header */                  /* Write header */
333                  if (ARG_OUTPUTTYPE) {                  if (ARG_OUTPUTTYPE) {
                         char *ptr;  
                         long test;  
334    
335                          test = LONG_PACK('M','P','4','U');                          long test = LONG_PACK('M','P','4','U');
                         ptr = (unsigned char *)&test;  
                         if(*ptr == 'M')  
                                 bigendian = 1;  
                         else  
                                 bigendian = 0;  
336    
337                          test = (!bigendian)?SWAP(test):test;                          test = (!bigendian)?SWAP(test):test;
338    

Legend:
Removed from v.558  
changed lines
  Added in v.566

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4