mirror of https://github.com/odrling/Aegisub
Fix crash when FFMS_GetCodecNameI returns NULL
This commit is contained in:
parent
16d55f9d64
commit
d4c831e346
|
@ -140,7 +140,8 @@ std::map<int, std::string> FFmpegSourceProvider::GetTracksOfType(FFMS_Indexer *I
|
|||
|
||||
for (int i=0; i<NumTracks; i++) {
|
||||
if (FFMS_GetTrackTypeI(Indexer, i) == Type) {
|
||||
std::string CodecName(FFMS_GetCodecNameI(Indexer, i));
|
||||
const char *CodecName = FFMS_GetCodecNameI(Indexer, i);
|
||||
if (CodecName)
|
||||
TrackList.insert(std::pair<int,std::string>(i, CodecName));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue