Change some string manipulations to equivalent operations that

gcc 2.95 understand.
This commit is contained in:
kristerw 2005-01-29 23:25:10 +00:00
parent da41e4dbde
commit 2ec69738f6
4 changed files with 47 additions and 1 deletions

View file

@ -1,4 +1,7 @@
$NetBSD: distinfo,v 1.14 2004/12/15 13:53:08 salo Exp $
$NetBSD: distinfo,v 1.15 2005/01/29 23:25:10 kristerw Exp $
SHA1 (mkvtoolnix-1.0.1.tar.bz2) = 67551f7d86314e55cb250ff44a58e1c3b39236d0
Size (mkvtoolnix-1.0.1.tar.bz2) = 523644 bytes
SHA1 (patch-aa) = 104355ded3f3e1050070135d8c25db0d772b27f7
SHA1 (patch-ab) = 74bbf8f9a092446af43253b9f7658890adf507d0
SHA1 (patch-ac) = 0bef3efaed92455b784585b8c7195325043509de

View file

@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.3 2005/01/29 23:25:11 kristerw Exp $
--- src/common/aac_common.h.orig Sat Jan 29 23:33:01 2005
+++ src/common/aac_common.h Sat Jan 29 23:33:23 2005
@@ -57,7 +57,7 @@
int MTX_DLL_API create_aac_data(unsigned char *data, int profile,
int channels, int sample_rate,
int output_sample_rate, bool sbr);
-bool MTX_DLL_API parse_aac_codec_id(const string &codec_id, int &id,
+bool MTX_DLL_API parse_aac_codec_id(const char *codec_id, int &id,
int &profile);
#endif // __AACCOMMON_H

View file

@ -0,0 +1,17 @@
$NetBSD: patch-ab,v 1.4 2005/01/29 23:25:11 kristerw Exp $
--- src/common/aac_common.cpp.orig Sat Jan 29 23:27:27 2005
+++ src/common/aac_common.cpp Sat Jan 29 23:32:45 2005
@@ -232,10 +232,10 @@
}
bool
-parse_aac_codec_id(const string &codec_id,
+parse_aac_codec_id(const char *codec_id,
int &id,
int &profile) {
- if (codec_id.size() < strlen(MKV_A_AAC_2LC))
+ if (strlen(codec_id) < strlen(MKV_A_AAC_2LC))
return false;
if (codec_id[10] == '2')

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1 2005/01/29 23:25:11 kristerw Exp $
--- src/input/r_matroska.cpp.orig Sat Jan 29 23:33:37 2005
+++ src/input/r_matroska.cpp Sat Jan 29 23:34:16 2005
@@ -1668,7 +1668,7 @@
id = 0;
profile = 0;
if (t->a_formattag == FOURCC('M', 'P', '4', 'A')) {
- if (!parse_aac_codec_id(string(t->codec_id), id, profile))
+ if (!parse_aac_codec_id(t->codec_id, id, profile))
mxerror(FMT_TID "Malformed codec id '%s'.\n", ti->fname,
(int64_t)t->tnum, t->codec_id);
} else {