From 870f46f85e9b6f6d0ce88fbfb2a79f7e0af076f7 Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Fri, 22 May 2009 22:12:31 +0000 Subject: [PATCH] FFMS2: Missing #ifdef Originally committed to SVN as r2975. --- aegisub/FFmpegSource2/ffms.cpp | 3 +++ aegisub/FFmpegSource2/ffms2rt.cpp | 5 +++-- aegisub/FFmpegSource2/indexing.cpp | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/aegisub/FFmpegSource2/ffms.cpp b/aegisub/FFmpegSource2/ffms.cpp index baeca8ed7..4c682a5f1 100644 --- a/aegisub/FFmpegSource2/ffms.cpp +++ b/aegisub/FFmpegSource2/ffms.cpp @@ -29,6 +29,7 @@ extern "C" { #ifdef __UNIX__ #define _snprintf snprintf +#define _scprintf scprintf #endif static int InitCount = 0; @@ -85,8 +86,10 @@ FFMS_API(FFAudio *) FFMS_CreateAudioSource(const char *SourceFile, int Track, FF switch (Index->Decoder) { case 0: return new FFLAVFAudio(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 3: return new FFHaaliAudio(SourceFile, Track, Index, 1, ErrorMsg, MsgSize); +#endif default: _snprintf(ErrorMsg, MsgSize, "Unsupported format"); return NULL; diff --git a/aegisub/FFmpegSource2/ffms2rt.cpp b/aegisub/FFmpegSource2/ffms2rt.cpp index 02475396a..acc22f648 100644 --- a/aegisub/FFmpegSource2/ffms2rt.cpp +++ b/aegisub/FFmpegSource2/ffms2rt.cpp @@ -105,9 +105,10 @@ int main(int argc, char *argv[]) { TestFiles1[3] = "pyramid-adaptive-10-bframes.mkv"; TestFiles1[4] = "negative-timecodes.avi"; TestFiles1[5] = "Zero1_ITV2_TS_Test.ts"; + TestFiles1[6] = "zx.starship.operators.01.h264.mkv"; - for (int i = 0; i < 5; i++) - TestFullDump1(TestFiles1[5], true); + for (int i = 0; i < 6; i++) + TestFullDump1(TestFiles1[i], true); /* TestFullDump1(TestFiles1[5], false); diff --git a/aegisub/FFmpegSource2/indexing.cpp b/aegisub/FFmpegSource2/indexing.cpp index ccd176547..242c1fa1d 100644 --- a/aegisub/FFmpegSource2/indexing.cpp +++ b/aegisub/FFmpegSource2/indexing.cpp @@ -446,6 +446,8 @@ FFIndex *FFMatroskaIndexer::DoIndexing(char *ErrorMsg, unsigned MsgSize) { AVCodecContext *AudioCodecContext = AudioContexts[Track].CTX; TempPacket.data = MC.Buffer; TempPacket.size = FrameSize; + if ((FrameFlags & FRAME_KF) != 0) + TempPacket.flags = PKT_FLAG_KEY; while (TempPacket.size > 0) { int dbsize = AVCODEC_MAX_AUDIO_FRAME_SIZE*10;