forked from mirror/openmw-tes3mp
More fix based on code review.
This commit is contained in:
parent
c396149f23
commit
f616000afb
1 changed files with 6 additions and 5 deletions
|
@ -81,15 +81,16 @@ int swr_convert(int *s, uint8_t** output, int outs, const uint8_t** input, int
|
||||||
}
|
}
|
||||||
int * swr_alloc_set_opts(int *s, int64_t outc, AVSampleFormat outf, int outr,
|
int * swr_alloc_set_opts(int *s, int64_t outc, AVSampleFormat outf, int outr,
|
||||||
int64_t inc, AVSampleFormat inf, int inr, int o, void* l) {
|
int64_t inc, AVSampleFormat inf, int inr, int o, void* l) {
|
||||||
if(inf == AV_SAMPLE_FMT_FLTP) { s = new int(1); }
|
if(inf == AV_SAMPLE_FMT_FLTP) {
|
||||||
|
s = new int(1);
|
||||||
|
} else {
|
||||||
|
throw std::runtime_error(
|
||||||
|
std::string("Unsupported sample format: ")+ av_get_sample_fmt_name(inf));
|
||||||
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
void swr_free(int **s) { delete *s; *s = NULL; }
|
void swr_free(int **s) { delete *s; *s = NULL; }
|
||||||
#define SwrContext int
|
#define SwrContext int
|
||||||
#undef AV_SAMPLE_FMT_U8P
|
|
||||||
#define AV_SAMPLE_FMT_U8P 0
|
|
||||||
#undef AV_SAMPLE_FMT_S16P
|
|
||||||
#define AV_SAMPLE_FMT_S16P 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_AUDIOQ_SIZE (5 * 16 * 1024)
|
#define MAX_AUDIOQ_SIZE (5 * 16 * 1024)
|
||||||
|
|
Loading…
Reference in a new issue