Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Thomas Daede
Vorbis tools
Commits
6db2e784
Commit
6db2e784
authored
Oct 18, 2001
by
Michael Smith
Browse files
Fix same bug as was fixed in libvorbis here.
svn path=/trunk/vorbis-tools/; revision=2157
parent
42301799
Changes
1
Hide whitespace changes
Inline
Side-by-side
vorbiscomment/vcedit.c
View file @
6db2e784
...
...
@@ -6,7 +6,7 @@
*
* Comment editing backend, suitable for use by nice frontend interfaces.
*
* last modified: $Id: vcedit.c,v 1.1
3
2001/
08/15 08:33:26
msmith Exp $
* last modified: $Id: vcedit.c,v 1.1
4
2001/
10/18 10:28:17
msmith Exp $
*/
#include
<stdio.h>
...
...
@@ -76,9 +76,9 @@ void vcedit_clear(vcedit_state *state)
/* Next two functions pulled straight from libvorbis, apart from one change
* - we don't want to overwrite the vendor string.
*/
static
void
_v_writestring
(
oggpack_buffer
*
o
,
char
*
s
)
static
void
_v_writestring
(
oggpack_buffer
*
o
,
char
*
s
,
int
len
)
{
while
(
*
s
)
while
(
len
--
)
{
oggpack_write
(
o
,
*
s
++
,
8
);
}
...
...
@@ -92,11 +92,11 @@ static int _commentheader_out(vorbis_comment *vc, char *vendor, ogg_packet *op)
/* preamble */
oggpack_write
(
&
opb
,
0x03
,
8
);
_v_writestring
(
&
opb
,
"vorbis"
);
_v_writestring
(
&
opb
,
"vorbis"
,
6
);
/* vendor */
oggpack_write
(
&
opb
,
strlen
(
vendor
),
32
);
_v_writestring
(
&
opb
,
vendor
);
_v_writestring
(
&
opb
,
vendor
,
strlen
(
vendor
)
);
/* comments */
oggpack_write
(
&
opb
,
vc
->
comments
,
32
);
...
...
@@ -105,7 +105,8 @@ static int _commentheader_out(vorbis_comment *vc, char *vendor, ogg_packet *op)
for
(
i
=
0
;
i
<
vc
->
comments
;
i
++
){
if
(
vc
->
user_comments
[
i
]){
oggpack_write
(
&
opb
,
vc
->
comment_lengths
[
i
],
32
);
_v_writestring
(
&
opb
,
vc
->
user_comments
[
i
]);
_v_writestring
(
&
opb
,
vc
->
user_comments
[
i
],
vc
->
comment_lengths
[
i
]);
}
else
{
oggpack_write
(
&
opb
,
0
,
32
);
}
...
...
Write
Preview
Supports
Markdown
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