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
086fc4d7
Commit
086fc4d7
authored
Feb 07, 2012
by
Clément Bœsch
Committed by
Clément Bœsch
Feb 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: move filtered_frame to the CONFIG_AVFILTER scope.
This simplifies a bit the #ifdefery.
parent
9303b794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ffmpeg.c
ffmpeg.c
+5
-6
No files found.
ffmpeg.c
View file @
086fc4d7
...
@@ -2120,7 +2120,6 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2120,7 +2120,6 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
rate_emu_sleep
(
ist
);
rate_emu_sleep
(
ist
);
for
(
i
=
0
;
i
<
nb_output_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_output_streams
;
i
++
)
{
AVFrame
*
filtered_frame
=
NULL
;
OutputStream
*
ost
=
&
output_streams
[
i
];
OutputStream
*
ost
=
&
output_streams
[
i
];
if
(
!
check_output_constraints
(
ist
,
ost
)
||
!
ost
->
encoding_needed
)
if
(
!
check_output_constraints
(
ist
,
ost
)
||
!
ost
->
encoding_needed
)
...
@@ -2129,6 +2128,8 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2129,6 +2128,8 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
#if CONFIG_AVFILTER
#if CONFIG_AVFILTER
while
(
av_buffersink_poll_frame
(
ost
->
output_video_filter
))
{
while
(
av_buffersink_poll_frame
(
ost
->
output_video_filter
))
{
AVRational
ist_pts_tb
=
ost
->
output_video_filter
->
inputs
[
0
]
->
time_base
;
AVRational
ist_pts_tb
=
ost
->
output_video_filter
->
inputs
[
0
]
->
time_base
;
AVFrame
*
filtered_frame
;
if
(
av_buffersink_get_buffer_ref
(
ost
->
output_video_filter
,
&
ost
->
picref
,
0
)
<
0
){
if
(
av_buffersink_get_buffer_ref
(
ost
->
output_video_filter
,
&
ost
->
picref
,
0
)
<
0
){
av_log
(
0
,
AV_LOG_WARNING
,
"AV Filter told us it has a frame available but failed to output one
\n
"
);
av_log
(
0
,
AV_LOG_WARNING
,
"AV Filter told us it has a frame available but failed to output one
\n
"
);
goto
cont
;
goto
cont
;
...
@@ -2146,16 +2147,14 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2146,16 +2147,14 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
}
}
if
(
ost
->
picref
->
video
&&
!
ost
->
frame_aspect_ratio
)
if
(
ost
->
picref
->
video
&&
!
ost
->
frame_aspect_ratio
)
ost
->
st
->
codec
->
sample_aspect_ratio
=
ost
->
picref
->
video
->
sample_aspect_ratio
;
ost
->
st
->
codec
->
sample_aspect_ratio
=
ost
->
picref
->
video
->
sample_aspect_ratio
;
#else
filtered_frame
=
decoded_frame
;
#endif
do_video_out
(
output_files
[
ost
->
file_index
].
ctx
,
ost
,
ist
,
filtered_frame
,
do_video_out
(
output_files
[
ost
->
file_index
].
ctx
,
ost
,
ist
,
filtered_frame
,
same_quant
?
quality
:
ost
->
st
->
codec
->
global_quality
);
same_quant
?
quality
:
ost
->
st
->
codec
->
global_quality
);
#if CONFIG_AVFILTER
cont:
cont:
avfilter_unref_buffer
(
ost
->
picref
);
avfilter_unref_buffer
(
ost
->
picref
);
}
}
#else
do_video_out
(
output_files
[
ost
->
file_index
].
ctx
,
ost
,
ist
,
decoded_frame
,
same_quant
?
quality
:
ost
->
st
->
codec
->
global_quality
);
#endif
#endif
}
}
...
...
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