#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define AUDIO_INBUF_SIZE 20480
#define AUDIO_REFILL_THRESH 4096
int main(
int argc,
char **argv)
{
const char *outfilename, *filename;
if (argc <= 2) {
fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
exit(0);
}
filename = argv[1];
outfilename = argv[2];
if (!codec) {
fprintf(stderr, "Codec not found\n");
exit(1);
}
if (!c) {
fprintf(stderr, "Could not allocate audio codec context\n");
exit(1);
}
fprintf(stderr, "Could not open codec\n");
exit(1);
}
f = fopen(filename, "rb");
if (!f) {
fprintf(stderr, "Could not open %s\n", filename);
exit(1);
}
outfile = fopen(outfilename, "wb");
if (!outfile) {
exit(1);
}
int got_frame = 0;
if (!decoded_frame) {
fprintf(stderr, "Could not allocate audio frame\n");
exit(1);
}
}
if (len < 0) {
fprintf(stderr, "Error while decoding\n");
exit(1);
}
if (got_frame) {
if (data_size < 0) {
fprintf(stderr, "Failed to calculate data size\n");
exit(1);
}
fwrite(decoded_frame->
data[ch] + data_size*i, 1, data_size, outfile);
}
if (len > 0)
}
}
fclose(outfile);
fclose(f);
return 0;
}