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
b8f4410f
Commit
b8f4410f
authored
Dec 17, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/flashsv2enc: drop dependancy on sizeof(AVFrame)
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8443b270
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
flashsv2enc.c
libavcodec/flashsv2enc.c
+1
-12
No files found.
libavcodec/flashsv2enc.c
View file @
b8f4410f
...
@@ -87,7 +87,6 @@ typedef struct FlashSV2Context {
...
@@ -87,7 +87,6 @@ typedef struct FlashSV2Context {
AVCodecContext
*
avctx
;
AVCodecContext
*
avctx
;
uint8_t
*
current_frame
;
uint8_t
*
current_frame
;
uint8_t
*
key_frame
;
uint8_t
*
key_frame
;
AVFrame
frame
;
uint8_t
*
encbuffer
;
uint8_t
*
encbuffer
;
uint8_t
*
keybuffer
;
uint8_t
*
keybuffer
;
uint8_t
*
databuffer
;
uint8_t
*
databuffer
;
...
@@ -849,15 +848,12 @@ static int reconfigure_at_keyframe(FlashSV2Context * s, const uint8_t * image,
...
@@ -849,15 +848,12 @@ static int reconfigure_at_keyframe(FlashSV2Context * s, const uint8_t * image,
}
}
static
int
flashsv2_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
static
int
flashsv2_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
p
ict
,
int
*
got_packet
)
const
AVFrame
*
p
,
int
*
got_packet
)
{
{
FlashSV2Context
*
const
s
=
avctx
->
priv_data
;
FlashSV2Context
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
&
s
->
frame
;
int
res
;
int
res
;
int
keyframe
=
0
;
int
keyframe
=
0
;
*
p
=
*
pict
;
if
((
res
=
ff_alloc_packet2
(
avctx
,
pkt
,
s
->
frame_size
+
FF_MIN_BUFFER_SIZE
))
<
0
)
if
((
res
=
ff_alloc_packet2
(
avctx
,
pkt
,
s
->
frame_size
+
FF_MIN_BUFFER_SIZE
))
<
0
)
return
res
;
return
res
;
...
@@ -891,18 +887,11 @@ static int flashsv2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -891,18 +887,11 @@ static int flashsv2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if
(
keyframe
)
{
if
(
keyframe
)
{
new_key_frame
(
s
);
new_key_frame
(
s
);
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
s
->
last_key_frame
=
avctx
->
frame_number
;
s
->
last_key_frame
=
avctx
->
frame_number
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Inserting key frame at frame %d
\n
"
,
avctx
->
frame_number
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Inserting key frame at frame %d
\n
"
,
avctx
->
frame_number
);
}
else
{
p
->
pict_type
=
AV_PICTURE_TYPE_P
;
p
->
key_frame
=
0
;
}
}
avctx
->
coded_frame
=
p
;
pkt
->
size
=
res
;
pkt
->
size
=
res
;
*
got_packet
=
1
;
*
got_packet
=
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