42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
--- common.c
|
|
+++ common.c
|
|
@@ -200,7 +200,7 @@ off_t ftello(FILE *stream) {
|
|
|
|
#define COPY(m, s) memcpy(&dst->m, &src->m, s)
|
|
void copy_headers(stream_header *dst, old_stream_header *src, int size) {
|
|
- if (size == sizeof(old_stream_header)) {
|
|
+ if (size - 1 == sizeof(old_stream_header)) {
|
|
COPY(streamtype[0], 8);
|
|
COPY(subtype[0], 4);
|
|
COPY(size, 4);
|
|
@@ -211,5 +211,5 @@ void copy_headers(stream_header *dst, ol
|
|
COPY(bits_per_sample, 2);
|
|
COPY(sh, sizeof(stream_header_video));
|
|
} else
|
|
- memcpy(dst, src, size);
|
|
+ memcpy(dst, src, sizeof(stream_header));
|
|
}
|
|
--- configure.in
|
|
+++ configure.in
|
|
@@ -31,7 +31,7 @@ fi
|
|
dnl Check for headers
|
|
AC_HEADER_STDC()
|
|
|
|
-CFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
|
|
-CXXFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
|
|
+CFLAGS="$CFLAGS -Wall -Wno-sign-compare \$(OGG_CFLAGS) \$(VORBIS_CFLAGS) \$(AVILIB_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILING_CFLAGS)"
|
|
+CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare \$(OGG_CFLAGS) \$(VORBIS_CFLAGS) \$(AVILIB_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILING_CFLAGS)"
|
|
|
|
AC_OUTPUT(Makefile avilib/Makefile)
|
|
--- vorbis_header_utils.c
|
|
+++ vorbis_header_utils.c
|
|
@@ -161,7 +161,7 @@ vorbis_comment *vorbis_comment_dup(vorbi
|
|
new_vc->user_comments[i] = strdup(vc->user_comments[i]);
|
|
new_vc->user_comments[vc->comments] = 0;
|
|
memcpy(new_vc->comment_lengths, vc->comment_lengths,
|
|
- (vc->comments + 1) * sizeof(char *));
|
|
+ (vc->comments + 1) * sizeof(int));
|
|
new_vc->vendor = strdup(vc->vendor);
|
|
|
|
return new_vc;
|