Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
d024d985
Commit
d024d985
authored
14 years ago
by
John Koleszar
Committed by
Code Review
14 years ago
Browse files
Options
Download
Plain Diff
Merge "Avoid encoding garbage when ivfenc encounters an unsupported Y4M file."
parents
1114183f
e703af97
v1.14.0-linphone
1.4.X
aylesbury
bali
cayuga
dixie
eider
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/atna/dec_sem_sync
sandbox/awatry/initial_opencl_implementation
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/hlundin/error-concealment
sandbox/holmer/error-concealment
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jkoleszar/cached-multibit
sandbox/jkoleszar/experimental-knobs
sandbox/jkoleszar/new-rate-control
sandbox/jkoleszar/new-rtcd
sandbox/jkoleszar/reuse-modemv
sandbox/jkoleszar/use-memcpy
sandbox/jzern@google.com/test
sandbox/slavarnway/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
vp9-preview
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.0
v1.0.0
v0.9.7
v0.9.7-p1
v0.9.6
v0.9.5
v0.9.2
v0.9.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivfenc.c
+20
-13
ivfenc.c
with
20 additions
and
13 deletions
ivfenc.c
+
20
−
13
View file @
d024d985
...
...
@@ -299,12 +299,11 @@ static int read_frame(FILE *f, vpx_image_t *img, unsigned int file_type,
}
unsigned
int
file_is_y4m
(
FILE
*
infile
,
unsigned
int
file_is_y4m
(
FILE
*
infile
,
y4m_input
*
y4m
,
char
detect
[
4
])
{
if
(
memcmp
(
detect
,
"YUV4"
,
4
)
==
0
&&
y4m_input_open
(
y4m
,
infile
,
detect
,
4
)
>=
0
)
if
(
memcmp
(
detect
,
"YUV4"
,
4
)
==
0
)
{
return
1
;
}
...
...
@@ -875,18 +874,26 @@ int main(int argc, const char **argv_)
if
(
file_is_y4m
(
infile
,
&
y4m
,
detect
.
buf
))
{
file_type
=
FILE_TYPE_Y4M
;
cfg
.
g_w
=
y4m
.
pic_w
;
cfg
.
g_h
=
y4m
.
pic_h
;
/* Use the frame rate from the file only if none was specified on the
* command-line.
*/
if
(
!
arg_have_timebase
)
if
(
y4m_input_open
(
&
y4m
,
infile
,
detect
.
buf
,
4
)
>=
0
)
{
cfg
.
g_timebase
.
num
=
y4m
.
fps_d
;
cfg
.
g_timebase
.
den
=
y4m
.
fps_n
;
file_type
=
FILE_TYPE_Y4M
;
cfg
.
g_w
=
y4m
.
pic_w
;
cfg
.
g_h
=
y4m
.
pic_h
;
/* Use the frame rate from the file only if none was specified
* on the command-line.
*/
if
(
!
arg_have_timebase
)
{
cfg
.
g_timebase
.
num
=
y4m
.
fps_d
;
cfg
.
g_timebase
.
den
=
y4m
.
fps_n
;
}
arg_use_i420
=
0
;
}
else
{
fprintf
(
stderr
,
"Unsupported Y4M stream.
\n
"
);
return
EXIT_FAILURE
;
}
arg_use_i420
=
0
;
}
else
if
(
file_is_ivf
(
infile
,
&
fourcc
,
&
cfg
.
g_w
,
&
cfg
.
g_h
,
detect
.
buf
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets