Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
01735b48
Commit
01735b48
authored
Jan 06, 2018
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/uncoded_frame: remove use of AVStream.codec.
parent
34dfe369
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
uncoded_frame.c
tools/uncoded_frame.c
+13
-15
No files found.
tools/uncoded_frame.c
View file @
01735b48
...
@@ -161,26 +161,24 @@ int main(int argc, char **argv)
...
@@ -161,26 +161,24 @@ int main(int argc, char **argv)
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to create output stream
\n
"
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"Failed to create output stream
\n
"
);
goto
fail
;
goto
fail
;
}
}
st
->
stream
->
codec
->
codec_type
=
av_buffersink_get_type
(
st
->
sink
);
st
->
stream
->
codecpar
->
codec_type
=
av_buffersink_get_type
(
st
->
sink
);
st
->
stream
->
time_base
=
st
->
stream
->
codec
->
time_base
=
st
->
stream
->
time_base
=
av_buffersink_get_time_base
(
st
->
sink
);
av_buffersink_get_time_base
(
st
->
sink
);
switch
(
av_buffersink_get_type
(
st
->
sink
))
{
switch
(
av_buffersink_get_type
(
st
->
sink
))
{
case
AVMEDIA_TYPE_VIDEO
:
case
AVMEDIA_TYPE_VIDEO
:
st
->
stream
->
codec
->
codec_id
=
AV_CODEC_ID_RAWVIDEO
;
st
->
stream
->
codec
par
->
codec_id
=
AV_CODEC_ID_RAWVIDEO
;
st
->
stream
->
avg_frame_rate
=
st
->
stream
->
avg_frame_rate
=
st
->
stream
->
r_frame_rate
=
av_buffersink_get_frame_rate
(
st
->
sink
);
st
->
stream
->
r_frame_rate
=
av_buffersink_get_frame_rate
(
st
->
sink
);
st
->
stream
->
codec
->
width
=
av_buffersink_get_w
(
st
->
sink
);
st
->
stream
->
codec
par
->
width
=
av_buffersink_get_w
(
st
->
sink
);
st
->
stream
->
codec
->
height
=
av_buffersink_get_h
(
st
->
sink
);
st
->
stream
->
codec
par
->
height
=
av_buffersink_get_h
(
st
->
sink
);
st
->
stream
->
codec
->
sample_aspect_ratio
=
av_buffersink_get_sample_aspect_ratio
(
st
->
sink
);
st
->
stream
->
codec
par
->
sample_aspect_ratio
=
av_buffersink_get_sample_aspect_ratio
(
st
->
sink
);
st
->
stream
->
codec
->
pix_fmt
=
av_buffersink_get_format
(
st
->
sink
);
st
->
stream
->
codec
par
->
format
=
av_buffersink_get_format
(
st
->
sink
);
break
;
break
;
case
AVMEDIA_TYPE_AUDIO
:
case
AVMEDIA_TYPE_AUDIO
:
st
->
stream
->
codec
->
channel_layout
=
av_buffersink_get_channel_layout
(
st
->
sink
);
st
->
stream
->
codecpar
->
channel_layout
=
av_buffersink_get_channel_layout
(
st
->
sink
);
st
->
stream
->
codec
->
channels
=
av_buffersink_get_channels
(
st
->
sink
);
st
->
stream
->
codecpar
->
channels
=
av_buffersink_get_channels
(
st
->
sink
);
st
->
stream
->
codec
->
sample_rate
=
av_buffersink_get_sample_rate
(
st
->
sink
);
st
->
stream
->
codecpar
->
sample_rate
=
av_buffersink_get_sample_rate
(
st
->
sink
);
st
->
stream
->
codec
->
sample_fmt
=
av_buffersink_get_format
(
st
->
sink
);
st
->
stream
->
codecpar
->
format
=
av_buffersink_get_format
(
st
->
sink
);
st
->
stream
->
codec
->
codec_id
=
st
->
stream
->
codecpar
->
codec_id
=
av_get_pcm_codec
(
st
->
stream
->
codecpar
->
format
,
-
1
);
av_get_pcm_codec
(
st
->
stream
->
codec
->
sample_fmt
,
-
1
);
break
;
break
;
default:
default:
av_assert0
(
!
"reached"
);
av_assert0
(
!
"reached"
);
...
@@ -245,7 +243,7 @@ int main(int argc, char **argv)
...
@@ -245,7 +243,7 @@ int main(int argc, char **argv)
frame
);
frame
);
frame
=
NULL
;
frame
=
NULL
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
st
->
stream
->
codec
,
AV_LOG_ERROR
,
av_log
(
st
->
mux
,
AV_LOG_ERROR
,
"Error writing frame: %s
\n
"
,
av_err2str
(
ret
));
"Error writing frame: %s
\n
"
,
av_err2str
(
ret
));
goto
fail
;
goto
fail
;
}
}
...
...
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