Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
mediastreamer2
Commits
98911772
Commit
98911772
authored
Feb 02, 2010
by
Simon Morlat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.linphone.org:mediastreamer2-private
parents
2cdd6635
f5a25a21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
src/nowebcam.c
src/nowebcam.c
+6
-2
tests/mediastream.c
tests/mediastream.c
+2
-2
No files found.
src/nowebcam.c
View file @
98911772
...
...
@@ -1589,6 +1589,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
mblk_t
*
m
=
NULL
;
struct
stat
statbuf
;
uint8_t
*
jpgbuf
;
int
err
;
#if !defined(_MSC_VER)
int
fd
=
open
(
jpgpath
,
O_RDONLY
);
#else
...
...
@@ -1620,10 +1621,13 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
return
m
;
}
#if !defined(_MSC_VER)
read
(
fd
,
jpgbuf
,
statbuf
.
st_size
);
err
=
read
(
fd
,
jpgbuf
,
statbuf
.
st_size
);
#else
_read
(
fd
,
jpgbuf
,
statbuf
.
st_size
);
err
=
_read
(
fd
,
jpgbuf
,
statbuf
.
st_size
);
#endif
if
(
err
!=
statbuf
.
st_size
){
ms_error
(
"Could not read as much as wanted !"
);
}
m
=
jpeg2yuv
(
jpgbuf
,
statbuf
.
st_size
,
reqsize
);
ms_free
(
jpgbuf
);
if
(
m
==
NULL
)
...
...
tests/mediastream.c
View file @
98911772
...
...
@@ -175,7 +175,7 @@ int main(int argc, char * argv[])
vs
.
width
=
MS_VIDEO_SIZE_CIF_W
;
vs
.
height
=
MS_VIDEO_SIZE_CIF_H
;
if
(
argc
<
4
)
{
printf
(
usage
);
printf
(
"%s"
,
usage
);
return
-
1
;
}
for
(
i
=
1
;
i
<
argc
;
i
++
){
...
...
@@ -185,7 +185,7 @@ int main(int argc, char * argv[])
}
else
if
(
strcmp
(
argv
[
i
],
"--remote"
)
==
0
){
i
++
;
if
(
!
parse_addr
(
argv
[
i
],
ip
,
sizeof
(
ip
),
&
remoteport
))
{
printf
(
usage
);
printf
(
"%s"
,
usage
);
return
-
1
;
}
printf
(
"Remote addr: ip=%s port=%i
\n
"
,
ip
,
remoteport
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment