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
8feac29c
Commit
8feac29c
authored
Feb 11, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: use AVFrame API properly in ff_reget_buffer()
parent
1155fd02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
utils.c
libavcodec/utils.c
+9
-7
No files found.
libavcodec/utils.c
View file @
8feac29c
...
...
@@ -754,7 +754,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
int
ff_reget_buffer
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
)
{
AVFrame
tmp
;
AVFrame
*
tmp
;
int
ret
;
av_assert0
(
avctx
->
codec_type
==
AVMEDIA_TYPE_VIDEO
);
...
...
@@ -768,18 +768,20 @@ int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
return
0
;
}
av_frame_move_ref
(
&
tmp
,
frame
);
tmp
=
av_frame_alloc
();
if
(
!
tmp
)
return
AVERROR
(
ENOMEM
);
av_frame_move_ref
(
tmp
,
frame
);
ret
=
ff_get_buffer
(
avctx
,
frame
,
AV_GET_BUFFER_FLAG_REF
);
if
(
ret
<
0
)
{
av_frame_
unref
(
&
tmp
);
av_frame_
free
(
&
tmp
);
return
ret
;
}
av_image_copy
(
frame
->
data
,
frame
->
linesize
,
tmp
.
data
,
tmp
.
linesize
,
frame
->
format
,
frame
->
width
,
frame
->
height
);
av_frame_unref
(
&
tmp
);
av_frame_copy
(
frame
,
tmp
);
av_frame_free
(
&
tmp
);
return
0
;
}
...
...
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