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
fd4b4dda
Commit
fd4b4dda
authored
May 03, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: fix indent.
parent
f8d58c59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
45 deletions
+44
-45
ffmpeg.c
ffmpeg.c
+44
-45
No files found.
ffmpeg.c
View file @
fd4b4dda
...
@@ -2066,58 +2066,57 @@ static int poll_filters(void)
...
@@ -2066,58 +2066,57 @@ static int poll_filters(void)
while
(
1
)
{
while
(
1
)
{
/* Reap all buffers present in the buffer sinks */
/* Reap all buffers present in the buffer sinks */
/* TODO reindent */
for
(
i
=
0
;
i
<
nb_output_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_output_streams
;
i
++
)
{
OutputStream
*
ost
=
output_streams
[
i
];
OutputStream
*
ost
=
output_streams
[
i
];
OutputFile
*
of
=
output_files
[
ost
->
file_index
];
OutputFile
*
of
=
output_files
[
ost
->
file_index
];
if
(
!
ost
->
filter
||
ost
->
is_past_recording_time
)
if
(
!
ost
->
filter
||
ost
->
is_past_recording_time
)
continue
;
continue
;
if
(
!
ost
->
filtered_frame
&&
!
(
ost
->
filtered_frame
=
avcodec_alloc_frame
()))
{
if
(
!
ost
->
filtered_frame
&&
!
(
ost
->
filtered_frame
=
avcodec_alloc_frame
()))
{
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
else
}
else
avcodec_get_frame_defaults
(
ost
->
filtered_frame
);
avcodec_get_frame_defaults
(
ost
->
filtered_frame
);
filtered_frame
=
ost
->
filtered_frame
;
filtered_frame
=
ost
->
filtered_frame
;
while
(
1
)
{
while
(
1
)
{
AVRational
ist_pts_tb
=
ost
->
filter
->
filter
->
inputs
[
0
]
->
time_base
;
AVRational
ist_pts_tb
=
ost
->
filter
->
filter
->
inputs
[
0
]
->
time_base
;
ret
=
av_buffersink_get_buffer_ref
(
ost
->
filter
->
filter
,
&
picref
,
ret
=
av_buffersink_get_buffer_ref
(
ost
->
filter
->
filter
,
&
picref
,
AV_BUFFERSINK_FLAG_NO_REQUEST
);
AV_BUFFERSINK_FLAG_NO_REQUEST
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
if
(
ret
!=
AVERROR
(
EAGAIN
))
{
if
(
ret
!=
AVERROR
(
EAGAIN
))
{
char
buf
[
256
];
char
buf
[
256
];
av_strerror
(
ret
,
buf
,
sizeof
(
buf
));
av_strerror
(
ret
,
buf
,
sizeof
(
buf
));
av_log
(
NULL
,
AV_LOG_WARNING
,
av_log
(
NULL
,
AV_LOG_WARNING
,
"Error in av_buffersink_get_buffer_ref(): %s
\n
"
,
buf
);
"Error in av_buffersink_get_buffer_ref(): %s
\n
"
,
buf
);
}
break
;
}
filtered_frame
->
pts
=
av_rescale_q
(
picref
->
pts
,
ist_pts_tb
,
AV_TIME_BASE_Q
);
//if (ost->source_index >= 0)
// *filtered_frame= *input_streams[ost->source_index]->decoded_frame; //for me_threshold
if
(
of
->
start_time
&&
filtered_frame
->
pts
<
of
->
start_time
)
return
0
;
switch
(
ost
->
filter
->
filter
->
inputs
[
0
]
->
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
avfilter_fill_frame_from_video_buffer_ref
(
filtered_frame
,
picref
);
if
(
!
ost
->
frame_aspect_ratio
)
ost
->
st
->
codec
->
sample_aspect_ratio
=
picref
->
video
->
sample_aspect_ratio
;
do_video_out
(
of
->
ctx
,
ost
,
filtered_frame
,
same_quant
?
ost
->
last_quality
:
ost
->
st
->
codec
->
global_quality
);
break
;
default:
// TODO support audio/subtitle filters
av_assert0
(
0
);
}
}
break
;
}
filtered_frame
->
pts
=
av_rescale_q
(
picref
->
pts
,
ist_pts_tb
,
AV_TIME_BASE_Q
);
// if (ost->source_index >= 0)
// *filtered_frame= *input_streams[ost->source_index]->decoded_frame; //for me_threshold
if
(
of
->
start_time
&&
filtered_frame
->
pts
<
of
->
start_time
)
return
0
;
switch
(
ost
->
filter
->
filter
->
inputs
[
0
]
->
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
avfilter_fill_frame_from_video_buffer_ref
(
filtered_frame
,
picref
);
if
(
!
ost
->
frame_aspect_ratio
)
ost
->
st
->
codec
->
sample_aspect_ratio
=
picref
->
video
->
sample_aspect_ratio
;
do_video_out
(
of
->
ctx
,
ost
,
filtered_frame
,
avfilter_unref_buffer
(
picref
);
same_quant
?
ost
->
last_quality
:
ost
->
st
->
codec
->
global_quality
);
break
;
default:
// TODO support audio/subtitle filters
av_assert0
(
0
);
}
}
avfilter_unref_buffer
(
picref
);
}
}
}
/* Request frames through all the graphs */
/* Request frames through all the graphs */
ret_all
=
nb_success
=
nb_eof
=
0
;
ret_all
=
nb_success
=
nb_eof
=
0
;
for
(
i
=
0
;
i
<
nb_filtergraphs
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_filtergraphs
;
i
++
)
{
...
...
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