ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mpeg_encode/src/param.c
(Generate patch)
# Line 325 | Line 325
325                                               "SLICES_PER_FRAME", "BSEARCH_ALG", "REFERENCE_FRAME"};
326    register int index;
327    register int row, col;
328 <
329 <  if ( (fpointer = fopen(fileName, "r")) == NULL ) {
330 <    fprintf(stderr, "Error:  Cannot open parameter file:  %s\n", fileName);
331 <    return FALSE;
328 >  
329 >  /* WLD */
330 >  if(fileName) {
331 >    if ( (fpointer = fopen(fileName, "r")) == NULL ) {
332 >      fprintf(stderr, "Error:  Cannot open parameter file:  %s\n", fileName);
333 >      return FALSE;
334 >    }
335 >  } else {
336 >    fpointer = stdin;
337    }
338 +  /* WLD END */
339  
340    /* should set defaults */
341    numInputFiles = 0;
# Line 739 | Line 745
745      }
746    }
747  
748 <  fclose(fpointer);
748 >  /* WLD */
749 >  if(fpointer != stdin) {
750 >    fclose(fpointer);
751 >  }
752 >  /* WLD END */
753  
754    for ( index = FIRST_OPTION; index <= LAST_OPTION; index++ ) {
755      if ( ! optionSeen[index] ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines