Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
dda20a6e
Commit
dda20a6e
authored
12 years ago
by
Anton Khirnov
Browse files
Options
Downloads
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
avprobe.c
+9
-6
9 additions, 6 deletions
avprobe.c
with
9 additions
and
6 deletions
avprobe.c
+
9
−
6
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
),
":"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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