OSDN Git Service

Merge branch 'hw-huffdctycc' into net-mjpeg
authorKenichi Kurimoto <kurimoto12@users.sourceforge.jp>
Tue, 8 Feb 2011 22:47:50 +0000 (07:47 +0900)
committerKenichi Kurimoto <kurimoto12@users.sourceforge.jp>
Tue, 8 Feb 2011 22:47:50 +0000 (07:47 +0900)
1  2 
snapgear-2.6-p42/user/jpeg-6b/jdatasrc.c

@@@ -95,12 -92,11 +95,14 @@@ fill_input_buffer (j_decompress_ptr cin
    my_src_ptr src = (my_src_ptr) cinfo->src;
    size_t nbytes;
  
 -  nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);
 -
 +  if(cinfo->is_net == 1){
 +    nbytes = read(cinfo->sock, src->buffer, INPUT_BUF_SIZE);
 +    }else{
 +    nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);
 +  }
    if (nbytes <= 0) {
+     /* add for LEON mjpeg pj*/
+     exit(0);
      if (src->start_of_file)   /* Treat empty input file as fatal error */
        ERREXIT(cinfo, JERR_INPUT_EMPTY);
      WARNMS(cinfo, JWRN_JPEG_EOF);