Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c9a5497a
Commit
c9a5497a
authored
Aug 18, 2014
by
Ben Hagen
Committed by
Michael Niedermayer
Aug 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/cinedec: allow number zero in metadata
parent
3c197442
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
cinedec.c
libavformat/cinedec.c
+15
-15
No files found.
libavformat/cinedec.c
View file @
c9a5497a
...
...
@@ -70,9 +70,9 @@ static int cine_read_probe(AVProbeData *p)
return
0
;
}
static
int
set_metadata_int
(
AVDictionary
**
dict
,
const
char
*
key
,
int
value
)
static
int
set_metadata_int
(
AVDictionary
**
dict
,
const
char
*
key
,
int
value
,
int
allow_zero
)
{
if
(
value
)
{
if
(
value
||
allow_zero
)
{
return
av_dict_set_int
(
dict
,
key
,
value
,
0
);
}
return
0
;
...
...
@@ -166,16 +166,16 @@ static int cine_read_header(AVFormatContext *avctx)
avio_skip
(
pb
,
20
);
// Shutter .. bEnableColor
set_metadata_int
(
&
st
->
metadata
,
"camera_version"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"firmware_version"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"software_version"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"recording_timezone"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"camera_version"
,
avio_rl32
(
pb
)
,
0
);
set_metadata_int
(
&
st
->
metadata
,
"firmware_version"
,
avio_rl32
(
pb
)
,
0
);
set_metadata_int
(
&
st
->
metadata
,
"software_version"
,
avio_rl32
(
pb
)
,
0
);
set_metadata_int
(
&
st
->
metadata
,
"recording_timezone"
,
avio_rl32
(
pb
)
,
0
);
CFA
=
avio_rl32
(
pb
);
set_metadata_int
(
&
st
->
metadata
,
"brightness"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"contrast"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"gamma"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"brightness"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"contrast"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"gamma"
,
avio_rl32
(
pb
)
,
1
);
avio_skip
(
pb
,
72
);
// Reserved1 .. WBView
...
...
@@ -227,7 +227,7 @@ static int cine_read_header(AVFormatContext *avctx)
avio_skip
(
pb
,
668
);
// Conv8Min ... Sensor
set_metadata_int
(
&
st
->
metadata
,
"shutter_ns"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"shutter_ns"
,
avio_rl32
(
pb
)
,
0
);
avio_skip
(
pb
,
24
);
// EDRShutterNs ... ImHeightAcq
...
...
@@ -245,11 +245,11 @@ static int cine_read_header(AVFormatContext *avctx)
avio_skip
(
pb
,
1176
);
// RisingEdge ... cmUser
set_metadata_int
(
&
st
->
metadata
,
"enable_crop"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"crop_left"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"crop_top"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"crop_right"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"crop_bottom"
,
avio_rl32
(
pb
));
set_metadata_int
(
&
st
->
metadata
,
"enable_crop"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"crop_left"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"crop_top"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"crop_right"
,
avio_rl32
(
pb
)
,
1
);
set_metadata_int
(
&
st
->
metadata
,
"crop_bottom"
,
avio_rl32
(
pb
)
,
1
);
/* parse image offsets */
avio_seek
(
pb
,
offImageOffsets
,
SEEK_SET
);
...
...
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