Skip to content

Commit

Permalink
Fix crash when finalizing indexing of video tracks with no parser
Browse files Browse the repository at this point in the history
The Matroska indexer doesn't keep the CodecContext around when it won't
be used for anything due to lavc not having a parser for the track's
video format, so don't assume it exists in Finalize().

Closes #166.
  • Loading branch information
tgoyne committed Jul 16, 2014
1 parent f46923e commit 63e1d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void FFMS_Index::Finalize(std::vector<SharedVideoContext> const& video_contexts)

if (track.TT != FFMS_TYPE_VIDEO) continue;

if (video_contexts[i].CodecContext->has_b_frames) {
if (video_contexts[i].CodecContext && video_contexts[i].CodecContext->has_b_frames) {
track.MaxBFrames = video_contexts[i].CodecContext->has_b_frames;
continue;
}
Expand Down

0 comments on commit 63e1d76

Please sign in to comment.