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
5b087549
Commit
5b087549
authored
Mar 02, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store aspect ratio in avis.
Originally committed as revision 12290 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1f3d74d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
avienc.c
libavformat/avienc.c
+32
-0
No files found.
libavformat/avienc.c
View file @
5b087549
...
...
@@ -283,6 +283,38 @@ static int avi_write_header(AVFormatContext *s)
end_tag
(
pb
,
avi
->
indexes
[
i
].
indx_start
);
}
if
(
stream
->
codec_type
==
CODEC_TYPE_VIDEO
&&
stream
->
sample_aspect_ratio
.
num
>
0
&&
stream
->
sample_aspect_ratio
.
den
>
0
){
int
vprp
=
start_tag
(
pb
,
"vprp"
);
AVRational
dar
=
av_mul_q
(
stream
->
sample_aspect_ratio
,
(
AVRational
){
stream
->
width
,
stream
->
height
});
int
num
,
den
;
av_reduce
(
&
num
,
&
den
,
dar
.
num
,
dar
.
den
,
0xFFFF
);
put_le32
(
pb
,
0
);
//video format = unknown
put_le32
(
pb
,
0
);
//video standard= unknown
put_le32
(
pb
,
lrintf
(
1
.
0
/
av_q2d
(
stream
->
time_base
)));
put_le32
(
pb
,
stream
->
width
);
put_le32
(
pb
,
stream
->
height
);
put_le16
(
pb
,
num
);
put_le16
(
pb
,
den
);
put_le32
(
pb
,
stream
->
width
);
put_le32
(
pb
,
stream
->
height
);
put_le32
(
pb
,
1
);
//progressive FIXME
put_le32
(
pb
,
stream
->
height
);
put_le32
(
pb
,
stream
->
width
);
put_le32
(
pb
,
stream
->
height
);
put_le32
(
pb
,
stream
->
width
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
end_tag
(
pb
,
vprp
);
}
end_tag
(
pb
,
list2
);
}
...
...
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