Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
2d15ac88
Commit
2d15ac88
authored
Sep 22, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: asf: ignore pts when no delta specified (fix #15090)
parent
b908703a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+2
-1
modules/demux/asf/asfpacket.c
modules/demux/asf/asfpacket.c
+6
-3
modules/demux/asf/asfpacket.h
modules/demux/asf/asfpacket.h
+1
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+2
-0
No files found.
modules/demux/asf/asf.c
View file @
2d15ac88
...
...
@@ -844,6 +844,7 @@ static int DemuxInit( demux_t *p_demux )
tk
->
p_es
=
NULL
;
tk
->
info
.
p_esp
=
NULL
;
tk
->
info
.
p_frame
=
NULL
;
tk
->
info
.
i_cat
=
UNKNOWN_ES
;
tk
->
queue
.
p_first
=
NULL
;
tk
->
queue
.
pp_last
=
&
tk
->
queue
.
p_first
;
...
...
@@ -1054,7 +1055,7 @@ static int DemuxInit( demux_t *p_demux )
es_format_Init
(
&
fmt
,
UNKNOWN_ES
,
0
);
}
tk
->
i_cat
=
fmt
.
i_cat
;
tk
->
i_cat
=
tk
->
info
.
i_cat
=
fmt
.
i_cat
;
if
(
fmt
.
i_cat
!=
UNKNOWN_ES
)
{
if
(
p_esp
&&
p_languages
&&
...
...
modules/demux/asf/asfpacket.c
View file @
2d15ac88
...
...
@@ -95,7 +95,7 @@ static uint32_t SkipBytes( stream_t *s, uint32_t i_bytes )
static
int
DemuxSubPayload
(
asf_packet_sys_t
*
p_packetsys
,
uint8_t
i_stream_number
,
block_t
**
pp_frame
,
uint32_t
i_sub_payload_data_length
,
mtime_t
i_pts
,
mtime_t
i_dts
,
uint32_t
i_media_object_offset
,
bool
b_keyframe
)
uint32_t
i_media_object_offset
,
bool
b_keyframe
,
bool
b_ignore_pts
)
{
/* FIXME I don't use i_media_object_number, sould I ? */
if
(
*
pp_frame
&&
i_media_object_offset
==
0
)
...
...
@@ -109,7 +109,7 @@ static int DemuxSubPayload( asf_packet_sys_t *p_packetsys,
return
-
1
;
}
p_frag
->
i_pts
=
VLC_TS_0
+
i_pts
;
p_frag
->
i_pts
=
(
b_ignore_pts
)
?
VLC_TS_INVALID
:
VLC_TS_0
+
i_pts
;
p_frag
->
i_dts
=
VLC_TS_0
+
i_dts
;
if
(
b_keyframe
)
p_frag
->
i_flags
|=
BLOCK_FLAG_TYPE_I
;
...
...
@@ -226,6 +226,8 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
if
(
!
p_tkinfo
)
goto
skip
;
bool
b_ignore_pts
=
(
p_tkinfo
->
i_cat
==
VIDEO_ES
);
/* ignore PTS delta with video when not set by mux */
/* Non compressed */
if
(
i_replicated_data_length
>
7
)
// should be at least 8 bytes
{
...
...
@@ -252,6 +254,7 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
/* i_media_object_offset is presentation time */
/* Next byte is Presentation Time Delta */
i_pts_delta
=
pkt
->
p_peek
[
pkt
->
i_skip
];
b_ignore_pts
=
false
;
i_base_pts
=
(
mtime_t
)
i_media_object_offset
;
i_base_pts
-=
*
p_packetsys
->
pi_preroll
;
pkt
->
i_skip
++
;
...
...
@@ -332,7 +335,7 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
if
(
i_sub_payload_data_length
&&
DemuxSubPayload
(
p_packetsys
,
i_stream_number
,
&
p_tkinfo
->
p_frame
,
i_sub_payload_data_length
,
i_payload_pts
,
i_payload_dts
,
i_media_object_offset
,
b_packet_keyframe
)
<
0
)
i_media_object_offset
,
b_packet_keyframe
,
b_ignore_pts
)
<
0
)
return
-
1
;
if
(
pkt
->
left
>
pkt
->
i_skip
+
i_sub_payload_data_length
)
...
...
modules/demux/asf/asfpacket.h
View file @
2d15ac88
...
...
@@ -33,6 +33,7 @@ typedef struct
block_t
*
p_frame
;
/* used to gather complete frame */
asf_object_stream_properties_t
*
p_sp
;
asf_object_extended_stream_properties_t
*
p_esp
;
int
i_cat
;
}
asf_track_info_t
;
typedef
struct
asf_packet_sys_s
asf_packet_sys_t
;
...
...
modules/demux/mp4/mp4.c
View file @
2d15ac88
...
...
@@ -2819,6 +2819,8 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
return
;
}
p_track
->
asfinfo
.
i_cat
=
p_track
->
fmt
.
i_cat
;
const
MP4_Box_t
*
p_elst
;
p_track
->
i_elst
=
0
;
p_track
->
i_elst_time
=
0
;
...
...
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