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
7fc8d8a1
Commit
7fc8d8a1
authored
Jul 15, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxvid: Do not entangle coded_frame
parent
56672aea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
libxvid.c
libavcodec/libxvid.c
+9
-9
No files found.
libavcodec/libxvid.c
View file @
7fc8d8a1
...
...
@@ -663,7 +663,6 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{
int
xerr
,
i
,
ret
,
user_packet
=
!!
pkt
->
data
;
struct
xvid_context
*
x
=
avctx
->
priv_data
;
AVFrame
*
p
=
avctx
->
coded_frame
;
int
mb_width
=
(
avctx
->
width
+
15
)
/
16
;
int
mb_height
=
(
avctx
->
height
+
15
)
/
16
;
char
*
tmp
;
...
...
@@ -749,23 +748,24 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if
(
xerr
>
0
)
{
*
got_packet
=
1
;
p
->
quality
=
xvid_enc_stats
.
quant
*
FF_QP2LAMBDA
;
avctx
->
coded_frame
->
quality
=
xvid_enc_stats
.
quant
*
FF_QP2LAMBDA
;
if
(
xvid_enc_stats
.
type
==
XVID_TYPE_PVOP
)
p
->
pict_type
=
AV_PICTURE_TYPE_P
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_P
;
else
if
(
xvid_enc_stats
.
type
==
XVID_TYPE_BVOP
)
p
->
pict_type
=
AV_PICTURE_TYPE_B
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_B
;
else
if
(
xvid_enc_stats
.
type
==
XVID_TYPE_SVOP
)
p
->
pict_type
=
AV_PICTURE_TYPE_S
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_S
;
else
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
if
(
xvid_enc_frame
.
out_flags
&
XVID_KEYFRAME
)
{
p
->
key_frame
=
1
;
avctx
->
coded_frame
->
key_frame
=
1
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
if
(
x
->
quicktime_format
)
return
xvid_strip_vol_header
(
avctx
,
pkt
,
xvid_enc_stats
.
hlength
,
xerr
);
}
else
p
->
key_frame
=
0
;
}
else
{
avctx
->
coded_frame
->
key_frame
=
0
;
}
pkt
->
size
=
xerr
;
...
...
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