Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
82b1a343
Commit
82b1a343
authored
Nov 06, 2012
by
John Koleszar
Browse files
Merge other top-level C code
Change-Id: I0ff77f51595599cc3de5183c6c655fd261e3d925
parent
6ad3b74a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
args.c
args.c
+1
-1
tools_common.c
tools_common.c
+8
-2
y4minput.c
y4minput.c
+2
-2
No files found.
args.c
View file @
82b1a343
...
...
@@ -52,7 +52,7 @@ int arg_match(struct arg *arg_, const struct arg_def *def, char **argv) {
arg
.
val
=
def
->
has_val
?
arg
.
argv
[
1
]
:
NULL
;
arg
.
argv_step
=
def
->
has_val
?
2
:
1
;
}
else
if
(
def
->
long_name
)
{
in
t
name_len
=
strlen
(
def
->
long_name
);
const
size_
t
name_len
=
strlen
(
def
->
long_name
);
if
(
strlen
(
arg
.
argv
[
0
])
>=
name_len
+
2
&&
arg
.
argv
[
0
][
1
]
==
'-'
...
...
tools_common.c
View file @
82b1a343
...
...
@@ -9,14 +9,20 @@
*/
#include <stdio.h>
#include "tools_common.h"
#ifdef
_WIN32
#if
def
ined(
_WIN32
) || defined(__OS2__)
#include <io.h>
#include <fcntl.h>
#ifdef __OS2__
#define _setmode setmode
#define _fileno fileno
#define _O_BINARY O_BINARY
#endif
#endif
FILE
*
set_binary_mode
(
FILE
*
stream
)
{
(
void
)
stream
;
#ifdef
_WIN32
#if
def
ined(
_WIN32
) || defined(__OS2__)
_setmode
(
_fileno
(
stream
),
_O_BINARY
);
#endif
return
stream
;
...
...
y4minput.c
View file @
82b1a343
...
...
@@ -669,7 +669,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip) {
buffer
[
i
]
=
*
_skip
++
;
_nskip
--
;
}
else
{
ret
=
fread
(
buffer
+
i
,
1
,
1
,
_fin
);
ret
=
(
int
)
fread
(
buffer
+
i
,
1
,
1
,
_fin
);
if
(
ret
<
1
)
return
-
1
;
}
if
(
buffer
[
i
]
==
'\n'
)
break
;
...
...
@@ -815,7 +815,7 @@ int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *_img) {
int
c_sz
;
int
ret
;
/*Read and skip the frame header.*/
ret
=
fread
(
frame
,
1
,
6
,
_fin
);
ret
=
(
int
)
fread
(
frame
,
1
,
6
,
_fin
);
if
(
ret
<
6
)
return
0
;
if
(
memcmp
(
frame
,
"FRAME"
,
5
))
{
fprintf
(
stderr
,
"Loss of framing in Y4M input data
\n
"
);
...
...
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