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
fb14e37d
Commit
fb14e37d
authored
Mar 10, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: re-enable use of buffersrc flags.
AV_BUFFERSRC_FLAG_PUSH is necessary to detect closed streams.
parent
b0012de4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
ffmpeg.c
ffmpeg.c
+9
-5
No files found.
ffmpeg.c
View file @
fb14e37d
...
...
@@ -220,7 +220,9 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
av_assert1
(
frame
->
data
[
0
]);
ist
->
sub2video
.
last_pts
=
frame
->
pts
=
pts
;
for
(
i
=
0
;
i
<
ist
->
nb_filters
;
i
++
)
av_buffersrc_write_frame
(
ist
->
filters
[
i
]
->
filter
,
frame
);
av_buffersrc_add_frame_flags
(
ist
->
filters
[
i
]
->
filter
,
frame
,
AV_BUFFERSRC_FLAG_KEEP_REF
|
AV_BUFFERSRC_FLAG_PUSH
);
}
static
void
sub2video_update
(
InputStream
*
ist
,
AVSubtitle
*
sub
)
...
...
@@ -1641,8 +1643,9 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
(
AVRational
){
1
,
ist
->
st
->
codec
->
sample_rate
},
decoded_frame
->
nb_samples
,
&
ist
->
filter_in_rescale_delta_last
,
(
AVRational
){
1
,
ist
->
st
->
codec
->
sample_rate
});
for
(
i
=
0
;
i
<
ist
->
nb_filters
;
i
++
)
av_buffersrc_write_frame
(
ist
->
filters
[
i
]
->
filter
,
decoded_frame
);
/* TODO re-add AV_BUFFERSRC_FLAG_PUSH */
av_buffersrc_add_frame_flags
(
ist
->
filters
[
i
]
->
filter
,
decoded_frame
,
AV_BUFFERSRC_FLAG_KEEP_REF
|
AV_BUFFERSRC_FLAG_PUSH
);
decoded_frame
->
pts
=
AV_NOPTS_VALUE
;
...
...
@@ -1751,8 +1754,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
AV_BUFFERSRC_FLAG_NO_COPY
|
AV_BUFFERSRC_FLAG_PUSH
);
}
else
if
(
av_buffersrc_write_frame
(
ist
->
filters
[
i
]
->
filter
,
decoded_frame
)
<
0
)
{
/* TODO add back AV_BUFFERSRC_FLAG_PUSH */
if
(
av_buffersrc_add_frame_flags
(
ist
->
filters
[
i
]
->
filter
,
decoded_frame
,
AV_BUFFERSRC_FLAG_KEEP_REF
|
AV_BUFFERSRC_FLAG_PUSH
)
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Failed to inject frame into filter network
\n
"
);
exit
(
1
);
}
...
...
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