743646d039
- greatly simplify type-mismatch-correcting patches. most of the mismatches actually match on size and signedness, so only fix the ones that don't match. tested to work on sparc64 by naddy@ a while back. - libmp4v2 is no longer part of this package
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
$OpenBSD: patch-frontend_main_c,v 1.6 2008/09/15 21:58:19 jakemsr Exp $
|
|
--- frontend/main.c.orig Thu Nov 1 05:33:29 2007
|
|
+++ frontend/main.c Sun Aug 31 01:55:23 2008
|
|
@@ -41,6 +41,7 @@
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <getopt.h>
|
|
+#include <string.h>
|
|
|
|
#include <neaacdec.h>
|
|
#include <mp4ff.h>
|
|
@@ -399,7 +400,7 @@ int decodeAACfile(char *aacfile, char *sndfile, char *
|
|
float *song_length)
|
|
{
|
|
int tagsize;
|
|
- unsigned long samplerate;
|
|
+ unsigned int samplerate;
|
|
unsigned char channels;
|
|
void *sample_buffer;
|
|
|
|
@@ -709,7 +710,7 @@ int decodeMP4file(char *mp4file, char *sndfile, char *
|
|
int infoOnly, int adts_out, float *song_length)
|
|
{
|
|
int track;
|
|
- unsigned long samplerate;
|
|
+ unsigned int samplerate;
|
|
unsigned char channels;
|
|
void *sample_buffer;
|
|
|
|
@@ -1085,7 +1086,7 @@ int main(int argc, char *argv[])
|
|
if (optarg)
|
|
{
|
|
char dr[10];
|
|
- if (sscanf(optarg, "%s", dr) < 1) {
|
|
+ if (sscanf(optarg, "%9s", dr) < 1) {
|
|
def_srate = 0;
|
|
} else {
|
|
def_srate = atoi(dr);
|
|
@@ -1096,7 +1097,7 @@ int main(int argc, char *argv[])
|
|
if (optarg)
|
|
{
|
|
char dr[10];
|
|
- if (sscanf(optarg, "%s", dr) < 1)
|
|
+ if (sscanf(optarg, "%9s", dr) < 1)
|
|
{
|
|
format = 1;
|
|
} else {
|
|
@@ -1110,7 +1111,7 @@ int main(int argc, char *argv[])
|
|
if (optarg)
|
|
{
|
|
char dr[10];
|
|
- if (sscanf(optarg, "%s", dr) < 1)
|
|
+ if (sscanf(optarg, "%9s", dr) < 1)
|
|
{
|
|
outputFormat = FAAD_FMT_16BIT; /* just use default */
|
|
} else {
|
|
@@ -1124,7 +1125,7 @@ int main(int argc, char *argv[])
|
|
if (optarg)
|
|
{
|
|
char dr[10];
|
|
- if (sscanf(optarg, "%s", dr) < 1)
|
|
+ if (sscanf(optarg, "%9s", dr) < 1)
|
|
{
|
|
object_type = LC; /* default */
|
|
} else {
|