Fix compiling errors without FFmpeg enabled

This commit is contained in:
bnnm 2017-03-19 19:38:15 +01:00
parent 3a98c9e7d5
commit 1a069dd5fa
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@ VGMSTREAM * init_vgmstream_x360_ast(STREAMFILE *streamFile) {
vgmstream->sample_rate = read_32bitBE(0x40,streamFile);
vgmstream->meta_type = meta_X360_AST;
#ifdef VGM_USE_FFMPEG
{
/* manually find sample offsets (XMA1 nonsense again) */
xma_sample_data xma_sd;
@ -59,7 +60,6 @@ VGMSTREAM * init_vgmstream_x360_ast(STREAMFILE *streamFile) {
//skip_samples = xma_sd.skip_samples; //todo add skip samples
}
#ifdef VGM_USE_FFMPEG
{
uint8_t buf[100];
size_t bytes;

View File

@ -255,6 +255,7 @@ VGMSTREAM * init_vgmstream_xwb(STREAMFILE *streamFile) {
}
else if (xwb.xact == 2 && xwb.version <= 38 /* v38: byte offset, v40+: sample offset, v39: ? */
&& (xwb.codec == XMA1 || xwb.codec == XMA2) && xwb.loop_flag) {
#ifdef VGM_USE_FFMPEG
/* need to manually find sample offsets, thanks to Microsoft dumb headers */
xma_sample_data xma_sd;
memset(&xma_sd,0,sizeof(xma_sample_data));
@ -282,6 +283,9 @@ VGMSTREAM * init_vgmstream_xwb(STREAMFILE *streamFile) {
//add padding back until it's fixed (affects looping)
// (in rare cases this causes a glitch in FFmpeg since it has a bug where it's missing some samples)
xwb.num_samples += 64 + 512;
#else
goto fail;
#endif
}