Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1eea855b
Commit
1eea855b
authored
Oct 15, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: remove AV_NOPTS_VALUE cast
AV_NOPTS_VALUE already contains a cast to int64_t
parent
a5c4d7af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+9
-9
No files found.
modules/codec/avcodec/encoder.c
View file @
1eea855b
...
@@ -953,9 +953,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -953,9 +953,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame
->
top_field_first
=
!!
p_pict
->
b_top_field_first
;
frame
->
top_field_first
=
!!
p_pict
->
b_top_field_first
;
/* Set the pts of the frame being encoded */
/* Set the pts of the frame being encoded */
frame
->
pts
=
p_pict
->
date
?
p_pict
->
date
:
(
int64_t
)
AV_NOPTS_VALUE
;
frame
->
pts
=
p_pict
->
date
?
p_pict
->
date
:
AV_NOPTS_VALUE
;
if
(
p_sys
->
b_hurry_up
&&
frame
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
if
(
p_sys
->
b_hurry_up
&&
frame
->
pts
!=
AV_NOPTS_VALUE
)
{
{
mtime_t
current_date
=
mdate
();
mtime_t
current_date
=
mdate
();
...
@@ -992,7 +992,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -992,7 +992,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
}
}
}
}
if
(
frame
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
&&
frame
->
pts
!=
0
)
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
&&
frame
->
pts
!=
0
)
{
{
if
(
p_sys
->
i_last_pts
==
frame
->
pts
)
if
(
p_sys
->
i_last_pts
==
frame
->
pts
)
{
{
...
@@ -1059,7 +1059,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -1059,7 +1059,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
p_block
->
i_dts
=
p_pict
->
date
;
p_block
->
i_dts
=
p_pict
->
date
;
p_block
->
i_pts
=
p_block
->
i_dts
;
p_block
->
i_pts
=
p_block
->
i_dts
;
}
}
else
if
(
p_sys
->
p_context
->
coded_frame
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
&&
else
if
(
p_sys
->
p_context
->
coded_frame
->
pts
!=
AV_NOPTS_VALUE
&&
p_sys
->
p_context
->
coded_frame
->
pts
!=
0
&&
p_sys
->
p_context
->
coded_frame
->
pts
!=
0
&&
p_sys
->
i_buggy_pts_detect
!=
p_sys
->
p_context
->
coded_frame
->
pts
)
p_sys
->
i_buggy_pts_detect
!=
p_sys
->
p_context
->
coded_frame
->
pts
)
{
{
...
@@ -1169,7 +1169,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1169,7 +1169,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
p_sys
->
frame
->
pts
=
date_Get
(
&
p_sys
->
buffer_date
);
p_sys
->
frame
->
pts
=
date_Get
(
&
p_sys
->
buffer_date
);
if
(
likely
(
p_sys
->
frame
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
)
if
(
likely
(
p_sys
->
frame
->
pts
!=
AV_NOPTS_VALUE
)
)
date_Increment
(
&
p_sys
->
buffer_date
,
p_sys
->
i_frame_size
);
date_Increment
(
&
p_sys
->
buffer_date
,
p_sys
->
i_frame_size
);
if
(
likely
(
p_aout_buf
)
)
if
(
likely
(
p_aout_buf
)
)
...
@@ -1187,7 +1187,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1187,7 +1187,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
p_aout_buf
->
p_buffer
+=
leftover
;
p_aout_buf
->
p_buffer
+=
leftover
;
p_aout_buf
->
i_buffer
-=
leftover
;
p_aout_buf
->
i_buffer
-=
leftover
;
if
(
likely
(
p_sys
->
frame
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
)
if
(
likely
(
p_sys
->
frame
->
pts
!=
AV_NOPTS_VALUE
)
)
p_aout_buf
->
i_pts
=
date_Get
(
&
p_sys
->
buffer_date
);
p_aout_buf
->
i_pts
=
date_Get
(
&
p_sys
->
buffer_date
);
}
}
...
@@ -1235,7 +1235,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1235,7 +1235,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
(
mtime_t
)
p_sys
->
frame
->
nb_samples
/
(
mtime_t
)
p_sys
->
frame
->
nb_samples
/
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
if
(
likely
(
packet
.
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
)
if
(
likely
(
packet
.
pts
!=
AV_NOPTS_VALUE
)
)
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
else
else
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
...
@@ -1260,7 +1260,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1260,7 +1260,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
(
mtime_t
)
p_sys
->
i_frame_size
/
(
mtime_t
)
p_sys
->
i_frame_size
/
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
if
(
likely
(
packet
.
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
)
if
(
likely
(
packet
.
pts
!=
AV_NOPTS_VALUE
)
)
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
else
else
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
...
@@ -1337,7 +1337,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1337,7 +1337,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
(
mtime_t
)
p_sys
->
frame
->
nb_samples
/
(
mtime_t
)
p_sys
->
frame
->
nb_samples
/
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
(
mtime_t
)
p_sys
->
p_context
->
sample_rate
;
if
(
likely
(
packet
.
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
)
if
(
likely
(
packet
.
pts
!=
AV_NOPTS_VALUE
)
)
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
p_block
->
i_dts
=
p_block
->
i_pts
=
packet
.
pts
;
else
else
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
p_block
->
i_dts
=
p_block
->
i_pts
=
VLC_TS_INVALID
;
...
...
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