sourced some error messages in the lavc video provider

Originally committed to SVN as r2302.
This commit is contained in:
Karl Blomster 2008-08-14 16:06:04 +00:00
parent 8129285630
commit 620cf44c46
1 changed files with 3 additions and 3 deletions

View File

@ -114,18 +114,18 @@ void LAVCVideoProvider::LoadVideo(Aegisub::String filename, double fps) {
break; break;
} }
} }
if (vidStream == -1) throw _T("Could not find a video stream"); if (vidStream == -1) throw _T("ffmpeg video provider: Could not find a video stream");
// Find codec // Find codec
codec = avcodec_find_decoder(codecContext->codec_id); codec = avcodec_find_decoder(codecContext->codec_id);
if (!codec) throw _T("Could not find suitable video decoder"); if (!codec) throw _T("ffmpeg video provider: Could not find suitable video decoder");
// Enable truncation // Enable truncation
//if (codec->capabilities & CODEC_CAP_TRUNCATED) codecContext->flags |= CODEC_FLAG_TRUNCATED; //if (codec->capabilities & CODEC_CAP_TRUNCATED) codecContext->flags |= CODEC_FLAG_TRUNCATED;
// Open codec // Open codec
result = avcodec_open(codecContext,codec); result = avcodec_open(codecContext,codec);
if (result < 0) throw _T("Failed to open video decoder"); if (result < 0) throw _T("ffmpeg video provider: Failed to open video decoder");
// Parse file for keyframes and other useful stuff // Parse file for keyframes and other useful stuff
LAVCKeyFrames LAVCFrameData(filename); LAVCKeyFrames LAVCFrameData(filename);