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
7eb6eb03
Commit
7eb6eb03
authored
Jun 27, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/mpegvideo_enc: simplify timestamp checks in load_input_picture()
Also improve error feedback while at it.
parent
c4db4b17
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+5
-6
No files found.
libavcodec/mpegvideo_enc.c
View file @
7eb6eb03
...
...
@@ -956,18 +956,17 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
if
(
pts
!=
AV_NOPTS_VALUE
)
{
if
(
s
->
user_specified_pts
!=
AV_NOPTS_VALUE
)
{
int64_t
time
=
pts
;
int64_t
last
=
s
->
user_specified_pts
;
if
(
time
<=
last
)
{
if
(
pts
<=
last
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"
Error, Invalid timestamp=%"
PRId64
", "
"last=%"
PRId64
"
\n
"
,
pts
,
s
->
user_specified_pts
);
return
-
1
;
"
Invalid pts (%"
PRId64
") <= last (%"
PRId64
")
\n
"
,
pts
,
last
);
return
AVERROR
(
EINVAL
)
;
}
if
(
!
s
->
low_delay
&&
display_picture_number
==
1
)
s
->
dts_delta
=
time
-
last
;
s
->
dts_delta
=
pts
-
last
;
}
s
->
user_specified_pts
=
pts
;
}
else
{
...
...
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