Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
4752bb67
Commit
4752bb67
authored
Mar 09, 2005
by
gbazin
Browse files
* modules/codec/ffmpeg/video.c: take input rate into account when interpolating next pts.
parent
ed524028
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/ffmpeg/video.c
View file @
4752bb67
...
...
@@ -27,6 +27,7 @@
*****************************************************************************/
#include
<vlc/vlc.h>
#include
<vlc/decoder.h>
#include
<vlc/input.h>
/* hmmm, just for INPUT_RATE_DEFAULT */
/* ffmpeg header */
#ifdef HAVE_FFMPEG_AVCODEC_H
...
...
@@ -172,8 +173,8 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
p_dec
->
fmt_out
.
video
.
i_aspect
=
VOUT_ASPECT_FACTOR
*
(
av_q2d
(
p_context
->
sample_aspect_ratio
)
*
p_context
->
width
/
p_context
->
height
);
p_dec
->
fmt_out
.
video
.
i_sar_num
=
p_context
->
sample_aspect_ratio
.
num
;
p_dec
->
fmt_out
.
video
.
i_sar_den
=
p_context
->
sample_aspect_ratio
.
den
;
p_dec
->
fmt_out
.
video
.
i_sar_num
=
p_context
->
sample_aspect_ratio
.
num
;
p_dec
->
fmt_out
.
video
.
i_sar_den
=
p_context
->
sample_aspect_ratio
.
den
;
#else
p_dec
->
fmt_out
.
video
.
i_aspect
=
VOUT_ASPECT_FACTOR
*
p_context
->
aspect_ratio
;
...
...
@@ -657,7 +658,8 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
{
p_sys
->
i_pts
+=
I64C
(
1000000
)
*
(
2
+
p_sys
->
p_ff_pic
->
repeat_pict
)
*
p_sys
->
p_context
->
frame_rate_base
/
p_sys
->
p_context
->
frame_rate_base
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
/
(
2
*
p_sys
->
p_context
->
frame_rate
);
}
...
...
Write
Preview
Supports
Markdown
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