Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
89953037
Commit
89953037
authored
Apr 16, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SMF: demux SysEx messages
(cherry picked from commit c1c27e1d7d47ec2d1055507fd70b2bef033d4e03)
parent
4ef62f71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
modules/demux/smf.c
modules/demux/smf.c
+16
-15
No files found.
modules/demux/smf.c
View file @
89953037
...
@@ -473,19 +473,22 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -473,19 +473,22 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
case
0xF0
:
/* System Exclusive */
case
0xF0
:
/* System Exclusive */
switch
(
event
)
switch
(
event
)
{
{
case
0xF0
:
/* System Specific */
case
0xF0
:
/* System Specific start */
case
0xF7
:
/* System Specific continuation */
{
{
/* TODO: don't skip these */
/* Variable length followed by SysEx event data */
stream_Read
(
s
,
NULL
,
1
);
/* Manuf ID */
int32_t
len
=
ReadVarInt
(
s
);
for
(;;)
if
(
len
==
-
1
)
{
return
-
1
;
uint8_t
c
;
if
(
stream_Read
(
s
,
&
c
,
1
)
!=
1
)
block
=
stream_Block
(
s
,
len
);
return
-
1
;
if
(
block
==
NULL
)
if
(
c
==
0xF7
)
return
-
1
;
goto
skip
;
block
=
block_Realloc
(
block
,
1
,
len
);
}
if
(
block
==
NULL
)
/* never reached */
return
-
1
;
block
->
p_buffer
[
0
]
=
event
;
goto
send
;
}
}
case
0xFF
:
/* SMF Meta Event */
case
0xFF
:
/* SMF Meta Event */
if
(
HandleMeta
(
p_demux
,
tr
))
if
(
HandleMeta
(
p_demux
,
tr
))
...
@@ -505,9 +508,6 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -505,9 +508,6 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
/* We cannot handle undefined "common" (non-real-time)
/* We cannot handle undefined "common" (non-real-time)
* events inside SMF, as we cannot differentiate a
* events inside SMF, as we cannot differentiate a
* one byte delta-time (< 0x80) from event data. */
* one byte delta-time (< 0x80) from event data. */
case
0xF7
:
/* End of sysex -> should never happen(?) */
msg_Err
(
p_demux
,
"unknown MIDI event 0x%02X"
,
event
);
return
-
1
;
/* undefined events */
default:
default:
datalen
=
0
;
datalen
=
0
;
break
;
break
;
...
@@ -545,6 +545,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -545,6 +545,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
stream_Read
(
s
,
block
->
p_buffer
+
2
,
datalen
-
1
);
stream_Read
(
s
,
block
->
p_buffer
+
2
,
datalen
-
1
);
}
}
send:
block
->
i_dts
=
block
->
i_pts
=
VLC_TS_0
+
date_Get
(
&
p_demux
->
p_sys
->
pts
);
block
->
i_dts
=
block
->
i_pts
=
VLC_TS_0
+
date_Get
(
&
p_demux
->
p_sys
->
pts
);
es_out_Send
(
p_demux
->
out
,
p_demux
->
p_sys
->
es
,
block
);
es_out_Send
(
p_demux
->
out
,
p_demux
->
p_sys
->
es
,
block
);
...
...
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