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
9c98eb1d
Commit
9c98eb1d
authored
Oct 07, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backport [16958] h264 and m4v detection fix
parent
8e5720cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
37 deletions
+14
-37
modules/demux/mpeg/h264.c
modules/demux/mpeg/h264.c
+5
-18
modules/demux/mpeg/m4v.c
modules/demux/mpeg/m4v.c
+6
-18
src/input/demux.c
src/input/demux.c
+2
-0
src/misc/modules.c
src/misc/modules.c
+1
-1
No files found.
modules/demux/mpeg/h264.c
View file @
9c98eb1d
...
...
@@ -75,33 +75,23 @@ static int Open( vlc_object_t * p_this )
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
vlc_bool_t
b_forced
=
VLC_FALSE
;
uint8_t
*
p_peek
;
vlc_value_t
val
;
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
5
)
<
5
)
{
msg_Err
(
p_demux
,
"cannot peek"
);
return
VLC_EGENERIC
;
}
if
(
!
strncmp
(
p_demux
->
psz_demux
,
"h264"
,
4
)
)
{
b_forced
=
VLC_TRUE
;
}
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
5
)
<
5
)
return
VLC_EGENERIC
;
if
(
p_peek
[
0
]
!=
0x00
||
p_peek
[
1
]
!=
0x00
||
p_peek
[
2
]
!=
0x00
||
p_peek
[
3
]
!=
0x01
||
(
p_peek
[
4
]
&
0x1F
)
!=
7
)
/* SPS */
{
if
(
!
b_forced
)
if
(
!
p_demux
->
b_force
)
{
msg_Warn
(
p_demux
,
"h264 module discarded (no startcode)"
);
return
VLC_EGENERIC
;
}
msg_Err
(
p_demux
,
"this doesn't look like a H264 ES stream, continuing"
);
msg_Err
(
p_demux
,
"this doesn't look like a H264 ES stream, "
"continuing anyway"
);
}
p_demux
->
pf_demux
=
Demux
;
...
...
@@ -112,10 +102,7 @@ static int Open( vlc_object_t * p_this )
var_Create
(
p_demux
,
"h264-fps"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_demux
,
"h264-fps"
,
&
val
);
p_sys
->
f_fps
=
val
.
f_float
;
if
(
val
.
f_float
<
0
.
001
)
{
p_sys
->
f_fps
=
0
.
001
;
}
if
(
val
.
f_float
<
0
.
001
)
p_sys
->
f_fps
=
0
.
001
;
msg_Dbg
(
p_demux
,
"using %.2f fps"
,
p_sys
->
f_fps
);
/*
...
...
modules/demux/mpeg/m4v.c
View file @
9c98eb1d
...
...
@@ -69,33 +69,21 @@ static int Open( vlc_object_t * p_this )
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
vlc_bool_t
b_forced
=
VLC_FALSE
;
uint8_t
*
p_peek
;
es_format_t
fmt
;
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
4
)
<
4
)
return
VLC_EGENERIC
;
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
4
)
<
4
)
if
(
p_peek
[
0
]
!=
0x00
||
p_peek
[
1
]
!=
0x00
||
p_peek
[
2
]
!=
0x01
)
{
msg_Err
(
p_demux
,
"cannot peek"
);
return
VLC_EGENERIC
;
}
if
(
!
strncmp
(
p_demux
->
psz_demux
,
"mp4v"
,
4
)
||
!
strncmp
(
p_demux
->
psz_demux
,
"m4v"
,
4
)
)
{
b_forced
=
VLC_TRUE
;
}
if
(
p_peek
[
0
]
!=
0x00
||
p_peek
[
1
]
!=
0x00
||
p_peek
[
2
]
!=
0x01
||
p_peek
[
3
]
>
0x2f
)
{
if
(
!
b_forced
)
if
(
!
p_demux
->
b_force
)
{
msg_Warn
(
p_demux
,
"m4v module discarded (no startcode)"
);
return
VLC_EGENERIC
;
}
msg_Warn
(
p_demux
,
"this doesn't look like an MPEG-4 ES stream, continuing anyway"
);
msg_Warn
(
p_demux
,
"this doesn't look like an MPEG-4 ES stream, "
"continuing anyway"
);
}
p_demux
->
pf_demux
=
Demux
;
...
...
@@ -126,7 +114,7 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
/* We need to wait until we g
t
t p_extra (VOL header) from the packetizer
/* We need to wait until we g
e
t p_extra (VOL header) from the packetizer
* before we create the output */
return
VLC_SUCCESS
;
...
...
src/input/demux.c
View file @
9c98eb1d
...
...
@@ -97,6 +97,8 @@ demux_t *__demux2_New( vlc_object_t *p_obj,
{
"ogg"
,
"ogg"
},
{
"ogm"
,
"ogg"
},
{
"pva"
,
"pva"
},
{
"rm"
,
"rm"
},
{
"m4v"
,
"m4v"
},
{
"h264"
,
"h264"
},
{
NULL
,
NULL
},
};
/* Here, we don't mind if it does not work, it must be quick */
...
...
src/misc/modules.c
View file @
9c98eb1d
...
...
@@ -577,7 +577,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
/* Store this new module */
p_list
[
i_index
].
p_module
=
p_module
;
p_list
[
i_index
].
i_score
=
p_module
->
i_score
+
i_shortcut_bonus
;
p_list
[
i_index
].
b_force
=
!!
i_shortcut_bonus
;
p_list
[
i_index
].
b_force
=
i_shortcut_bonus
&&
b_strict
;
/* Add it to the modules-to-probe list */
if
(
i_index
==
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