Possible fix for crash in LAVCKeyframes constructor

Originally committed to SVN as r1986.
This commit is contained in:
Niels Martin Hansen 2008-03-09 00:04:30 +00:00
parent c6a1b9649b
commit 49d7b55755
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ LAVCKeyFrames::LAVCKeyFrames(const Aegisub::String filename)
// Find video stream
for (unsigned int i = 0; i < file->fctx->nb_streams; ++i) {
codecContext = file->fctx->streams[i]->codec;
if (!codecContext) continue;
codecContext->skip_frame = AVDISCARD_NONKEY;
codecContext->workaround_bugs = FF_BUG_AUTODETECT;
if (codecContext->codec_type == CODEC_TYPE_VIDEO) {