Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
f3ad50e8
Commit
f3ad50e8
authored
Sep 23, 2010
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix playback of RealVideo with B frames (pts were not calculated properly)
parent
40022577
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+15
-6
No files found.
modules/codec/avcodec/video.c
View file @
f3ad50e8
...
...
@@ -619,6 +619,12 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
continue
;
}
/* Sanity check (seems to be needed for some streams) */
if
(
p_sys
->
p_ff_pic
->
pict_type
==
FF_B_TYPE
)
{
p_sys
->
b_has_b_frames
=
true
;
}
/* Compute the PTS */
mtime_t
i_pts
=
VLC_TS_INVALID
;
if
(
p_sys
->
p_ff_pic
->
reordered_opaque
!=
INT64_MIN
)
...
...
@@ -632,6 +638,15 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
!
p_sys
->
p_ff_pic
->
reference
||
p_sys
->
i_pts
<=
VLC_TS_INVALID
)
i_pts
=
i_ts
;
/* Guess what ? The rules are different for Real Video :( */
if
(
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_RV30
||
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_RV40
)
&&
p_sys
->
b_has_b_frames
)
{
i_pts
=
VLC_TS_INVALID
;
if
(
p_sys
->
p_ff_pic
->
reference
)
i_pts
=
i_ts
;
}
}
else
{
...
...
@@ -707,12 +722,6 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
decoder_LinkPicture
(
p_dec
,
p_pic
);
}
/* Sanity check (seems to be needed for some streams) */
if
(
p_sys
->
p_ff_pic
->
pict_type
==
FF_B_TYPE
)
{
p_sys
->
b_has_b_frames
=
true
;
}
if
(
!
p_dec
->
fmt_in
.
video
.
i_sar_num
||
!
p_dec
->
fmt_in
.
video
.
i_sar_den
)
{
/* Fetch again the aspect ratio in case it changed */
...
...
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