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
0c9afacb
Commit
0c9afacb
authored
Mar 09, 2010
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp3: use FF_BUFFER_TYPE_COPY
Originally committed as revision 22359 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e72d2d12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vp3.c
libavcodec/vp3.c
+4
-4
No files found.
libavcodec/vp3.c
View file @
0c9afacb
...
...
@@ -1889,8 +1889,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
/* release the last frame, if it is allocated and if it is not the
* golden frame */
if
((
s
->
last_frame
.
data
[
0
])
&&
(
s
->
last_frame
.
data
[
0
]
!=
s
->
golden_frame
.
data
[
0
]))
if
(
s
->
last_frame
.
data
[
0
]
&&
s
->
last_frame
.
type
!=
FF_BUFFER_TYPE_COPY
)
avctx
->
release_buffer
(
avctx
,
&
s
->
last_frame
);
/* shuffle frames (last = current) */
...
...
@@ -1900,6 +1899,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
if
(
s
->
golden_frame
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
golden_frame
);
s
->
golden_frame
=
s
->
current_frame
;
s
->
last_frame
.
type
=
FF_BUFFER_TYPE_COPY
;
}
s
->
current_frame
.
data
[
0
]
=
NULL
;
/* ensure that we catch any access to this released frame */
...
...
@@ -1941,9 +1941,9 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
free_vlc
(
&
s
->
motion_vector_vlc
);
/* release all frames */
if
(
s
->
golden_frame
.
data
[
0
]
&&
s
->
golden_frame
.
data
[
0
]
!=
s
->
last_frame
.
data
[
0
]
)
if
(
s
->
golden_frame
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
golden_frame
);
if
(
s
->
last_frame
.
data
[
0
])
if
(
s
->
last_frame
.
data
[
0
]
&&
s
->
last_frame
.
type
!=
FF_BUFFER_TYPE_COPY
)
avctx
->
release_buffer
(
avctx
,
&
s
->
last_frame
);
/* no need to release the current_frame since it will always be pointing
* to the same frame as either the golden or last frame */
...
...
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