Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a8907dbc
Commit
a8907dbc
authored
Oct 11, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Meta event payload may be non-ASCII. Fix previous commit
parent
f8bd3111
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/demux/smf.c
modules/demux/smf.c
+11
-3
No files found.
modules/demux/smf.c
View file @
a8907dbc
...
...
@@ -23,6 +23,7 @@
#include <vlc_demux.h>
#include <vlc_aout.h>
#include <vlc_codecs.h>
#include <vlc_charset.h>
#include <limits.h>
static
int
Open
(
vlc_object_t
*
);
...
...
@@ -278,8 +279,6 @@ int HandleMeta (demux_t *p_demux, mtrk_t *tr)
return
-
1
;
}
for
(
int32_t
i
=
0
;
i
<
length
;
i
++
)
payload
[
i
]
&=
0x7f
;
payload
[
length
]
=
'\0'
;
switch
(
type
)
...
...
@@ -288,36 +287,45 @@ int HandleMeta (demux_t *p_demux, mtrk_t *tr)
break
;
case
0x01
:
/* Test (comment) */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Text : %s"
,
(
char
*
)
payload
);
break
;
case
0x02
:
/* Copyright */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Copyright : %s"
,
(
char
*
)
payload
);
break
;
case
0x03
:
/* Track name */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Track name: %s"
,
(
char
*
)
payload
);
break
;
case
0x04
:
/* Instrument name */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Instrument: %s"
,
(
char
*
)
payload
);
break
;
case
0x05
:
/* Lyric (one syllable) */
/*EnsureUTF8 ((char *)payload);*/
break
;
case
0x06
:
/* Marker text */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Marker : %s"
,
(
char
*
)
payload
);
case
0x07
:
/* Cue point (WAVE filename) */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Cue point : %s"
,
(
char
*
)
payload
);
break
;
case
0x08
:
/* Program/Patch name */
EnsureUTF8
((
char
*
)
payload
);
msg_Info
(
p_demux
,
"Patch name: %s"
,
(
char
*
)
payload
);
break
;
case
0x09
:
/* MIDI port name */
EnsureUTF8
((
char
*
)
payload
);
msg_Dbg
(
p_demux
,
"MIDI port : %s"
,
(
char
*
)
payload
);
break
;
...
...
@@ -331,7 +339,7 @@ int HandleMeta (demux_t *p_demux, mtrk_t *tr)
case
0x51
:
/* Tempo */
{
uint32_t
tempo
=
(
payload
[
0
]
<<
1
4
)
|
(
payload
[
1
]
<<
7
)
|
payload
[
2
];
uint32_t
tempo
=
(
payload
[
0
]
<<
1
6
)
|
(
payload
[
1
]
<<
8
)
|
payload
[
2
];
/* FIXME: change date */
msg_Dbg
(
p_demux
,
"new tempo: %u"
,
(
unsigned
)
tempo
);
break
;
...
...
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