From 3ef79404f2582d00d01e0c2c9edcea250e5f0203 Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Tue, 23 Sep 2008 19:51:19 +0000 Subject: [PATCH] FFmpegSource2: no more error errors Originally committed to SVN as r2376. --- FFmpegSource2/ffms.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FFmpegSource2/ffms.cpp b/FFmpegSource2/ffms.cpp index fa935072a..d3686c50c 100644 --- a/FFmpegSource2/ffms.cpp +++ b/FFmpegSource2/ffms.cpp @@ -35,7 +35,9 @@ FFMS_API(VideoBase *) FFMS_CreateVideoSource(const char *SourceFile, int Track, switch (TrackIndices->Decoder) { case 0: return new FFVideoSource(SourceFile, Track, TrackIndices, PP, Threads, SeekMode, ErrorMsg, MsgSize); case 1: return new MatroskaVideoSource(SourceFile, Track, TrackIndices, PP, Threads, ErrorMsg, MsgSize); - default: return NULL; + default: + _snprintf(ErrorMsg, MsgSize, "Unsupported format"); + return NULL; } } catch (...) { return NULL; @@ -47,7 +49,9 @@ FFMS_API(AudioBase *) FFMS_CreateAudioSource(const char *SourceFile, int Track, switch (TrackIndices->Decoder) { //case 0: return new FFVideoSource(SourceFile, Track, TrackIndices, ErrorMsg, MsgSize); case 1: return new MatroskaAudioSource(SourceFile, Track, TrackIndices, ErrorMsg, MsgSize); - default: return NULL; + default: + _snprintf(ErrorMsg, MsgSize, "Unsupported format"); + return NULL; } } catch (...) { return NULL;