Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
dacfc1a7
Commit
dacfc1a7
authored
Jun 01, 2005
by
gbazin
Browse files
* modules/packetizer/mpeg4video.c: work-around for buggy streams.
parent
c4f5ef79
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/packetizer/mpeg4video.c
View file @
dacfc1a7
...
...
@@ -31,6 +31,7 @@
#include
<vlc/vlc.h>
#include
<vlc/decoder.h>
#include
<vlc/sout.h>
#include
<vlc/input.h>
/* hmmm, just for INPUT_RATE_DEFAULT */
#include
"vlc_bits.h"
...
...
@@ -355,11 +356,21 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
(
i_modulo_time_base
*
p_dec
->
p_sys
->
i_fps_num
);
}
if
(
p_dec
->
p_sys
->
i_fps_num
)
p_sys
->
i_interpolated_pts
+=
(
(
i_time_ref
+
i_time_increment
-
p_sys
->
i_last_time
-
p_sys
->
i_last_timeincr
)
*
I64C
(
1000000
)
/
p_dec
->
p_sys
->
i_fps_num
);
if
(
p_dec
->
p_sys
->
i_fps_num
<
5
&&
/* Work-around buggy streams */
p_dec
->
fmt_in
.
video
.
i_frame_rate
>
0
&&
p_dec
->
fmt_in
.
video
.
i_frame_rate_base
>
0
)
{
p_sys
->
i_interpolated_pts
+=
I64C
(
1000000
)
*
p_dec
->
fmt_in
.
video
.
i_frame_rate_base
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
/
p_dec
->
fmt_in
.
video
.
i_frame_rate
;
}
else
if
(
p_dec
->
p_sys
->
i_fps_num
)
p_sys
->
i_interpolated_pts
+=
(
I64C
(
1000000
)
*
(
i_time_ref
+
i_time_increment
-
p_sys
->
i_last_time
-
p_sys
->
i_last_timeincr
)
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
/
p_dec
->
p_sys
->
i_fps_num
);
p_sys
->
i_last_time
=
i_time_ref
;
p_sys
->
i_last_timeincr
=
i_time_increment
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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