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
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
e186a15e
Commit
e186a15e
authored
Dec 15, 2014
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: allow non seekable on fragmented
parent
046732dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
38 deletions
+41
-38
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+41
-38
No files found.
modules/demux/mp4/mp4.c
View file @
e186a15e
...
...
@@ -585,12 +585,6 @@ static int Open( vlc_object_t * p_this )
/* I need to seek */
stream_Control
(
p_demux
->
s
,
STREAM_CAN_SEEK
,
&
p_sys
->
b_seekable
);
if
(
!
p_sys
->
b_seekable
)
{
msg_Warn
(
p_demux
,
"MP4 plugin discarded (not seekable)"
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
stream_Control
(
p_demux
->
s
,
STREAM_CAN_FASTSEEK
,
&
p_sys
->
b_fastseekable
);
p_sys
->
b_seekmode
=
p_sys
->
b_fastseekable
;
...
...
@@ -610,38 +604,6 @@ static int Open( vlc_object_t * p_this )
if
(
LoadInitFrag
(
p_demux
)
!=
VLC_SUCCESS
)
goto
error
;
if
(
MP4_BoxCount
(
p_sys
->
p_root
,
"/moov/mvex"
)
>
0
)
{
if
(
p_sys
->
b_seekable
)
{
/* Probe remaining to check if there's really fragments
or if that file is just ready to append fragments */
ProbeFragments
(
p_demux
,
false
);
p_sys
->
b_fragmented
=
!!
MP4_BoxCount
(
p_sys
->
p_root
,
"/moof"
);
if
(
p_sys
->
b_fragmented
&&
!
p_sys
->
i_overall_duration
)
ProbeFragments
(
p_demux
,
true
);
}
else
p_sys
->
b_fragmented
=
true
;
}
if
(
!
p_sys
->
moovfragment
.
p_moox
)
AddFragment
(
p_demux
,
MP4_BoxGet
(
p_sys
->
p_root
,
"/moov"
)
);
/* we always need a moov entry, but smooth has a workaround */
if
(
!
p_sys
->
moovfragment
.
p_moox
&&
!
p_sys
->
b_smooth
)
goto
error
;
if
(
p_sys
->
b_smooth
)
{
if
(
InitTracks
(
p_demux
)
!=
VLC_SUCCESS
)
goto
error
;
CreateTracksFromSmooBox
(
p_demux
);
return
VLC_SUCCESS
;
}
MP4_BoxDumpStructure
(
p_demux
->
s
,
p_sys
->
p_root
);
if
(
(
p_ftyp
=
MP4_BoxGet
(
p_sys
->
p_root
,
"/ftyp"
)
)
)
{
...
...
@@ -695,13 +657,54 @@ static int Open( vlc_object_t * p_this )
msg_Dbg
(
p_demux
,
"file type box missing (assuming ISO Media file)"
);
}
if
(
MP4_BoxCount
(
p_sys
->
p_root
,
"/moov/mvex"
)
>
0
)
{
if
(
p_sys
->
b_seekable
&&
!
p_sys
->
b_smooth
&&
!
p_sys
->
b_dash
)
{
/* Probe remaining to check if there's really fragments
or if that file is just ready to append fragments */
ProbeFragments
(
p_demux
,
false
);
p_sys
->
b_fragmented
=
!!
MP4_BoxCount
(
p_sys
->
p_root
,
"/moof"
);
if
(
p_sys
->
b_fragmented
&&
!
p_sys
->
i_overall_duration
)
ProbeFragments
(
p_demux
,
true
);
}
else
p_sys
->
b_fragmented
=
true
;
}
if
(
!
p_sys
->
moovfragment
.
p_moox
)
AddFragment
(
p_demux
,
MP4_BoxGet
(
p_sys
->
p_root
,
"/moov"
)
);
/* we always need a moov entry, but smooth has a workaround */
if
(
!
p_sys
->
moovfragment
.
p_moox
&&
!
p_sys
->
b_smooth
)
goto
error
;
if
(
p_sys
->
b_smooth
)
{
if
(
InitTracks
(
p_demux
)
!=
VLC_SUCCESS
)
goto
error
;
CreateTracksFromSmooBox
(
p_demux
);
return
VLC_SUCCESS
;
}
MP4_BoxDumpStructure
(
p_demux
->
s
,
p_sys
->
p_root
);
if
(
p_sys
->
b_smooth
||
p_sys
->
b_dash
)
{
p_demux
->
pf_demux
=
DemuxFrg
;
msg_Dbg
(
p_demux
,
"Set DemuxFrg mode"
);
}
else
if
(
p_sys
->
b_fragmented
)
{
p_demux
->
pf_demux
=
DemuxAsLeaf
;
msg_Dbg
(
p_demux
,
"Set experimental DemuxLeaf mode"
);
}
if
(
!
p_sys
->
b_seekable
&&
p_demux
->
pf_demux
==
Demux
)
{
msg_Warn
(
p_demux
,
"MP4 plugin discarded (not seekable)"
);
goto
error
;
}
/* the file need to have one moov box */
...
...
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