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
dda20a6e
Commit
dda20a6e
authored
Jan 03, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avprobe: also output dar/par if only defined in stream
Based on a patch by Jan Gerber <j@v2v.cc>
parent
be6cde3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
avprobe.c
avprobe.c
+9
-6
No files found.
avprobe.c
View file @
dda20a6e
...
...
@@ -583,7 +583,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
const
AVCodec
*
dec
;
const
char
*
profile
;
char
val_str
[
128
];
AVRational
display_aspect_ratio
;
AVRational
display_aspect_ratio
,
*
sar
=
NULL
;
const
AVPixFmtDescriptor
*
desc
;
probe_object_header
(
"stream"
);
...
...
@@ -618,13 +618,16 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
probe_int
(
"width"
,
dec_ctx
->
width
);
probe_int
(
"height"
,
dec_ctx
->
height
);
probe_int
(
"has_b_frames"
,
dec_ctx
->
has_b_frames
);
if
(
dec_ctx
->
sample_aspect_ratio
.
num
)
{
if
(
dec_ctx
->
sample_aspect_ratio
.
num
)
sar
=
&
dec_ctx
->
sample_aspect_ratio
;
else
if
(
stream
->
sample_aspect_ratio
.
num
)
sar
=
&
stream
->
sample_aspect_ratio
;
if
(
sar
)
{
probe_str
(
"sample_aspect_ratio"
,
rational_string
(
val_str
,
sizeof
(
val_str
),
":"
,
&
dec_ctx
->
sample_aspect_ratio
));
rational_string
(
val_str
,
sizeof
(
val_str
),
":"
,
sar
));
av_reduce
(
&
display_aspect_ratio
.
num
,
&
display_aspect_ratio
.
den
,
dec_ctx
->
width
*
dec_ctx
->
sample_aspect_ratio
.
num
,
dec_ctx
->
height
*
dec_ctx
->
sample_aspect_ratio
.
den
,
dec_ctx
->
width
*
sar
->
num
,
dec_ctx
->
height
*
sar
->
den
,
1024
*
1024
);
probe_str
(
"display_aspect_ratio"
,
rational_string
(
val_str
,
sizeof
(
val_str
),
":"
,
...
...
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