Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
8b269f94
Commit
8b269f94
authored
Oct 23, 2015
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: add adaptative smooth hotfix
parent
9187e4c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+27
-1
No files found.
modules/demux/mp4/mp4.c
View file @
8b269f94
...
...
@@ -83,7 +83,8 @@ struct demux_sys_t
bool
b_seekable
;
bool
b_fastseekable
;
bool
b_seekmode
;
bool
b_smooth
;
/* Is it Smooth Streaming? */
bool
b_smooth
;
/* Is it Smooth Streaming? (streamfilter) */
bool
b_ismv
;
bool
b_index_probed
;
bool
b_fragments_probed
;
...
...
@@ -649,6 +650,11 @@ static int Open( vlc_object_t * p_this )
{
msg_Dbg
(
p_demux
,
"DASH Stream"
);
}
else
if
(
BOXDATA
(
p_ftyp
)
->
i_compatible_brands
[
i
]
==
VLC_FOURCC
(
's'
,
'm'
,
'o'
,
'o'
)
)
{
msg_Dbg
(
p_demux
,
"Handling VLC Smooth Stream"
);
p_sys
->
b_ismv
=
true
;
}
}
}
else
...
...
@@ -4250,6 +4256,18 @@ static bool AddFragment( demux_t *p_demux, MP4_Box_t *p_moox )
i_track_defaultsamplesize
=
1
;
i_track_defaultsampleduration
=
1
;
}
else
if
(
p_sys
->
b_ismv
&&
p_sys
->
i_tracks
==
1
)
{
const
MP4_Box_t
*
p_trex
=
MP4_BoxGet
(
p_moovfragment
->
p_moox
,
"mvex/trex"
);
if
(
p_trex
)
{
i_track_defaultsamplesize
=
BOXDATA
(
p_trex
)
->
i_default_sample_size
;
i_track_defaultsampleduration
=
BOXDATA
(
p_trex
)
->
i_default_sample_duration
;
}
const
MP4_Box_t
*
p_mdhd
=
MP4_BoxGet
(
p_moovfragment
->
p_moox
,
"trak/mdia/mdhd"
);
if
(
p_mdhd
)
i_track_timescale
=
BOXDATA
(
p_mdhd
)
->
i_timescale
;
}
else
{
/* set trex for defaults */
...
...
@@ -5141,6 +5159,14 @@ static int DemuxAsLeaf( demux_t *p_demux )
return
1
;
}
/* Hotfix for adaptive/smooth streaming as we don't know track # when creating moov */
if
(
p_fragbox
->
i_type
==
ATOM_moof
&&
p_sys
->
b_ismv
&&
p_sys
->
i_tracks
==
1
)
{
MP4_Box_t
*
p_tfhd
=
MP4_BoxGet
(
p_fragbox
,
"traf/tfhd"
);
if
(
p_tfhd
&&
BOXDATA
(
p_tfhd
))
p_sys
->
track
[
0
].
i_track_ID
=
BOXDATA
(
p_tfhd
)
->
i_track_ID
;
}
MP4_Box_t
*
p_mfhd
=
MP4_BoxGet
(
p_fragbox
,
"mfhd"
);
if
(
p_mfhd
&&
BOXDATA
(
p_mfhd
)
)
{
...
...
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