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
4a4841d4
Commit
4a4841d4
authored
Nov 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fraps: use the AVFrame API properly.
parent
e8ef8a32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fraps.c
libavcodec/fraps.c
+6
-4
No files found.
libavcodec/fraps.c
View file @
4a4841d4
...
...
@@ -45,7 +45,7 @@
*/
typedef
struct
FrapsContext
{
AVCodecContext
*
avctx
;
AVFrame
frame
;
AVFrame
*
frame
;
uint8_t
*
tmpbuf
;
int
tmpbuf_size
;
DSPContext
dsp
;
...
...
@@ -66,7 +66,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
s
->
tmpbuf
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
);
s
->
frame
=
av_frame_alloc
();
if
(
!
s
->
frame
)
return
AVERROR
(
ENOMEM
);
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
...
...
@@ -136,7 +138,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
AVFrame
*
frame
=
data
;
AVFrame
*
const
f
=
&
s
->
frame
;
AVFrame
*
const
f
=
s
->
frame
;
uint32_t
header
;
unsigned
int
version
,
header_size
;
unsigned
int
x
,
y
;
...
...
@@ -361,7 +363,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
{
FrapsContext
*
s
=
(
FrapsContext
*
)
avctx
->
priv_data
;
av_frame_
unref
(
&
s
->
frame
);
av_frame_
free
(
&
s
->
frame
);
av_freep
(
&
s
->
tmpbuf
);
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