mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Fix crash when FFMS_GetCodecNameI returns NULL
This commit is contained in:
parent
16d55f9d64
commit
d4c831e346
@ -140,8 +140,9 @@ 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));
|
||||
TrackList.insert(std::pair<int,std::string>(i, CodecName));
|
||||
const char *CodecName = FFMS_GetCodecNameI(Indexer, i);
|
||||
if (CodecName)
|
||||
TrackList.insert(std::pair<int,std::string>(i, CodecName));
|
||||
}
|
||||
}
|
||||
return TrackList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user