Commit 98911772 authored by Simon Morlat's avatar Simon Morlat

Merge branch 'master' of git.linphone.org:mediastreamer2-private

parents 2cdd6635 f5a25a21
...@@ -1589,6 +1589,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){ ...@@ -1589,6 +1589,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
mblk_t *m=NULL; mblk_t *m=NULL;
struct stat statbuf; struct stat statbuf;
uint8_t *jpgbuf; uint8_t *jpgbuf;
int err;
#if !defined(_MSC_VER) #if !defined(_MSC_VER)
int fd=open(jpgpath,O_RDONLY); int fd=open(jpgpath,O_RDONLY);
#else #else
...@@ -1620,10 +1621,13 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){ ...@@ -1620,10 +1621,13 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
return m; return m;
} }
#if !defined(_MSC_VER) #if !defined(_MSC_VER)
read(fd,jpgbuf,statbuf.st_size); err=read(fd,jpgbuf,statbuf.st_size);
#else #else
_read(fd,jpgbuf,statbuf.st_size); err=_read(fd,jpgbuf,statbuf.st_size);
#endif #endif
if (err!=statbuf.st_size){
ms_error("Could not read as much as wanted !");
}
m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize); m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize);
ms_free(jpgbuf); ms_free(jpgbuf);
if (m==NULL) if (m==NULL)
......
...@@ -175,7 +175,7 @@ int main(int argc, char * argv[]) ...@@ -175,7 +175,7 @@ int main(int argc, char * argv[])
vs.width=MS_VIDEO_SIZE_CIF_W; vs.width=MS_VIDEO_SIZE_CIF_W;
vs.height=MS_VIDEO_SIZE_CIF_H; vs.height=MS_VIDEO_SIZE_CIF_H;
if (argc<4) { if (argc<4) {
printf(usage); printf("%s",usage);
return -1; return -1;
} }
for (i=1;i<argc;i++){ for (i=1;i<argc;i++){
...@@ -185,7 +185,7 @@ int main(int argc, char * argv[]) ...@@ -185,7 +185,7 @@ int main(int argc, char * argv[])
}else if (strcmp(argv[i],"--remote")==0){ }else if (strcmp(argv[i],"--remote")==0){
i++; i++;
if (!parse_addr(argv[i],ip,sizeof(ip),&remoteport)) { if (!parse_addr(argv[i],ip,sizeof(ip),&remoteport)) {
printf(usage); printf("%s",usage);
return -1; return -1;
} }
printf("Remote addr: ip=%s port=%i\n",ip,remoteport); printf("Remote addr: ip=%s port=%i\n",ip,remoteport);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment