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
03d0ea0c
Commit
03d0ea0c
authored
13 years ago
by
Clément Bœsch
Browse files
Options
Downloads
Patches
Plain Diff
ffprobe: remove media_type_string() by inlining av_x_if_null().
parent
a70e7874
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
ffprobe.c
+2
-8
2 additions, 8 deletions
ffprobe.c
with
2 additions
and
8 deletions
ffprobe.c
+
2
−
8
View file @
03d0ea0c
...
...
@@ -122,12 +122,6 @@ static char *ts_value_string (char *buf, int buf_size, int64_t ts)
return
buf
;
}
static
const
char
*
media_type_string
(
enum
AVMediaType
media_type
)
{
const
char
*
s
=
av_get_media_type_string
(
media_type
);
return
s
?
s
:
"unknown"
;
}
struct
writer
{
const
char
*
name
;
...
...
@@ -315,7 +309,7 @@ static void show_packet(struct writer *w, AVFormatContext *fmt_ctx, AVPacket *pk
if
(
packet_idx
)
printf
(
"%s"
,
w
->
items_sep
);
w
->
print_header
(
"PACKET"
);
print_str0
(
"codec_type"
,
media_type_string
(
st
->
codec
->
codec_type
));
print_str0
(
"codec_type"
,
av_x_if_null
(
av_get_
media_type_string
(
st
->
codec
->
codec_type
)
,
"unknown"
)
);
print_int
(
"stream_index"
,
pkt
->
stream_index
);
print_str
(
"pts"
,
ts_value_string
(
val_str
,
sizeof
(
val_str
),
pkt
->
pts
));
print_str
(
"pts_time"
,
time_value_string
(
val_str
,
sizeof
(
val_str
),
pkt
->
pts
,
&
st
->
time_base
));
...
...
@@ -397,7 +391,7 @@ static void show_stream(struct writer *w, AVFormatContext *fmt_ctx, int stream_i
print_str
(
"codec_name"
,
"unknown"
);
}
print_str
(
"codec_type"
,
media_type_string
(
dec_ctx
->
codec_type
));
print_str
(
"codec_type"
,
av_x_if_null
(
av_get_
media_type_string
(
dec_ctx
->
codec_type
)
,
"unknown"
)
);
print_fmt
(
"codec_time_base"
,
"%d/%d"
,
dec_ctx
->
time_base
.
num
,
dec_ctx
->
time_base
.
den
);
/* print AVI/FourCC tag */
...
...
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