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
3f47d316
Commit
3f47d316
authored
Jan 07, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo_enc: do not modify the input frame.
parent
7bcaeb40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+8
-8
No files found.
libavcodec/mpegvideo_enc.c
View file @
3f47d316
...
...
@@ -186,9 +186,8 @@ void ff_init_qscale_tab(MpegEncContext *s)
}
}
static
void
copy_picture_attributes
(
MpegEncContext
*
s
,
AVFrame
*
dst
,
AVFrame
*
src
)
static
void
copy_picture_attributes
(
MpegEncContext
*
s
,
AVFrame
*
dst
,
const
AVFrame
*
src
)
{
int
i
;
...
...
@@ -907,18 +906,18 @@ static int get_intra_count(MpegEncContext *s, uint8_t *src,
}
static
int
load_input_picture
(
MpegEncContext
*
s
,
AVFrame
*
pic_arg
)
static
int
load_input_picture
(
MpegEncContext
*
s
,
const
AVFrame
*
pic_arg
)
{
AVFrame
*
pic
=
NULL
;
int64_t
pts
;
int
i
;
int
i
,
display_picture_number
=
0
;
const
int
encoding_delay
=
s
->
max_b_frames
?
s
->
max_b_frames
:
(
s
->
low_delay
?
0
:
1
);
int
direct
=
1
;
if
(
pic_arg
)
{
pts
=
pic_arg
->
pts
;
pic_arg
->
display_picture_number
=
s
->
input_picture_number
++
;
display_picture_number
=
s
->
input_picture_number
++
;
if
(
pts
!=
AV_NOPTS_VALUE
)
{
if
(
s
->
user_specified_pts
!=
AV_NOPTS_VALUE
)
{
...
...
@@ -932,7 +931,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
return
-
1
;
}
if
(
!
s
->
low_delay
&&
pic_arg
->
display_picture_number
==
1
)
if
(
!
s
->
low_delay
&&
display_picture_number
==
1
)
s
->
dts_delta
=
time
-
last
;
}
s
->
user_specified_pts
=
pts
;
...
...
@@ -944,7 +943,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
"Warning: AVFrame.pts=? trying to guess (%"
PRId64
")
\n
"
,
pts
);
}
else
{
pts
=
pic_arg
->
display_picture_number
;
pts
=
display_picture_number
;
}
}
}
...
...
@@ -1025,6 +1024,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
}
}
copy_picture_attributes
(
s
,
pic
,
pic_arg
);
pic
->
display_picture_number
=
display_picture_number
;
pic
->
pts
=
pts
;
// we set this here to avoid modifiying pic_arg
}
...
...
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