FFMS2: Missing #ifdef

Originally committed to SVN as r2975.
This commit is contained in:
Fredrik Mellbin 2009-05-22 22:12:31 +00:00
parent a3ad037940
commit 870f46f85e
3 changed files with 8 additions and 2 deletions
aegisub/FFmpegSource2

View file

@ -29,6 +29,7 @@ extern "C" {
#ifdef __UNIX__ #ifdef __UNIX__
#define _snprintf snprintf #define _snprintf snprintf
#define _scprintf scprintf
#endif #endif
static int InitCount = 0; static int InitCount = 0;
@ -85,8 +86,10 @@ FFMS_API(FFAudio *) FFMS_CreateAudioSource(const char *SourceFile, int Track, FF
switch (Index->Decoder) { switch (Index->Decoder) {
case 0: return new FFLAVFAudio(SourceFile, Track, Index, ErrorMsg, MsgSize); case 0: return new FFLAVFAudio(SourceFile, Track, Index, ErrorMsg, MsgSize);
case 1: return new FFMatroskaAudio(SourceFile, Track, Index, ErrorMsg, MsgSize); case 1: return new FFMatroskaAudio(SourceFile, Track, Index, ErrorMsg, MsgSize);
#ifdef HAALISOURCE
case 2: return new FFHaaliAudio(SourceFile, Track, Index, 0, ErrorMsg, MsgSize); case 2: return new FFHaaliAudio(SourceFile, Track, Index, 0, ErrorMsg, MsgSize);
case 3: return new FFHaaliAudio(SourceFile, Track, Index, 1, ErrorMsg, MsgSize); case 3: return new FFHaaliAudio(SourceFile, Track, Index, 1, ErrorMsg, MsgSize);
#endif
default: default:
_snprintf(ErrorMsg, MsgSize, "Unsupported format"); _snprintf(ErrorMsg, MsgSize, "Unsupported format");
return NULL; return NULL;

View file

@ -105,9 +105,10 @@ int main(int argc, char *argv[]) {
TestFiles1[3] = "pyramid-adaptive-10-bframes.mkv"; TestFiles1[3] = "pyramid-adaptive-10-bframes.mkv";
TestFiles1[4] = "negative-timecodes.avi"; TestFiles1[4] = "negative-timecodes.avi";
TestFiles1[5] = "Zero1_ITV2_TS_Test.ts"; TestFiles1[5] = "Zero1_ITV2_TS_Test.ts";
TestFiles1[6] = "zx.starship.operators.01.h264.mkv";
for (int i = 0; i < 5; i++) for (int i = 0; i < 6; i++)
TestFullDump1(TestFiles1[5], true); TestFullDump1(TestFiles1[i], true);
/* /*
TestFullDump1(TestFiles1[5], false); TestFullDump1(TestFiles1[5], false);

View file

@ -446,6 +446,8 @@ FFIndex *FFMatroskaIndexer::DoIndexing(char *ErrorMsg, unsigned MsgSize) {
AVCodecContext *AudioCodecContext = AudioContexts[Track].CTX; AVCodecContext *AudioCodecContext = AudioContexts[Track].CTX;
TempPacket.data = MC.Buffer; TempPacket.data = MC.Buffer;
TempPacket.size = FrameSize; TempPacket.size = FrameSize;
if ((FrameFlags & FRAME_KF) != 0)
TempPacket.flags = PKT_FLAG_KEY;
while (TempPacket.size > 0) { while (TempPacket.size > 0) {
int dbsize = AVCODEC_MAX_AUDIO_FRAME_SIZE*10; int dbsize = AVCODEC_MAX_AUDIO_FRAME_SIZE*10;