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
8dcf5184
Commit
8dcf5184
authored
Jul 26, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp3/theora: flush after seek.
parent
e0e65ddb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
vp3.c
libavcodec/vp3.c
+22
-0
No files found.
libavcodec/vp3.c
View file @
8dcf5184
...
...
@@ -2321,6 +2321,26 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
return
vp3_decode_init
(
avctx
);
}
static
void
vp3_decode_flush
(
AVCodecContext
*
avctx
)
{
Vp3DecodeContext
*
s
=
avctx
->
priv_data
;
if
(
s
->
golden_frame
.
data
[
0
])
{
if
(
s
->
golden_frame
.
data
[
0
]
==
s
->
last_frame
.
data
[
0
])
memset
(
&
s
->
last_frame
,
0
,
sizeof
(
AVFrame
));
if
(
s
->
current_frame
.
data
[
0
]
==
s
->
golden_frame
.
data
[
0
])
memset
(
&
s
->
current_frame
,
0
,
sizeof
(
AVFrame
));
ff_thread_release_buffer
(
avctx
,
&
s
->
golden_frame
);
}
if
(
s
->
last_frame
.
data
[
0
])
{
if
(
s
->
current_frame
.
data
[
0
]
==
s
->
last_frame
.
data
[
0
])
memset
(
&
s
->
current_frame
,
0
,
sizeof
(
AVFrame
));
ff_thread_release_buffer
(
avctx
,
&
s
->
last_frame
);
}
if
(
s
->
current_frame
.
data
[
0
])
ff_thread_release_buffer
(
avctx
,
&
s
->
current_frame
);
}
AVCodec
ff_theora_decoder
=
{
"theora"
,
AVMEDIA_TYPE_VIDEO
,
...
...
@@ -2332,6 +2352,7 @@ AVCodec ff_theora_decoder = {
vp3_decode_frame
,
CODEC_CAP_DR1
|
CODEC_CAP_DRAW_HORIZ_BAND
|
CODEC_CAP_FRAME_THREADS
,
NULL
,
.
flush
=
vp3_decode_flush
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Theora"
),
.
update_thread_context
=
ONLY_IF_THREADS_ENABLED
(
vp3_update_thread_context
)
};
...
...
@@ -2348,6 +2369,7 @@ AVCodec ff_vp3_decoder = {
vp3_decode_frame
,
CODEC_CAP_DR1
|
CODEC_CAP_DRAW_HORIZ_BAND
|
CODEC_CAP_FRAME_THREADS
,
NULL
,
.
flush
=
vp3_decode_flush
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"On2 VP3"
),
.
update_thread_context
=
ONLY_IF_THREADS_ENABLED
(
vp3_update_thread_context
)
};
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