FFmpegSource2: no more error errors

Originally committed to SVN as r2376.
This commit is contained in:
Fredrik Mellbin 2008-09-23 19:51:19 +00:00
parent 6898afabac
commit 3ef79404f2
1 changed files with 6 additions and 2 deletions

View File

@ -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;