Commit a6cff1ec authored by François Grisez's avatar François Grisez

Avoid crash while opening a file encoded with unsupported codec

parent 31480eb7
......@@ -2222,12 +2222,16 @@ static int player_open_file(MSFilter *f, void *arg) {
if(track) {
obj->players[i] = mkv_track_player_new(obj->reader, track);
if(obj->players[i] == NULL) {
ms_error("MKVPlayer: could not instanciate MKVTrackPlayer for track #%d", track->num);
goto fail;
ms_warning("MKVPlayer: could not instanciate MKVTrackPlayer for track #%d", track->num);
}
}
obj->state = MSPlayerPaused;
}
if(obj->players[0] == NULL && obj->players[1] == NULL) {
ms_error("MKVPlayer: no tack found");
goto fail;
}
obj->state = MSPlayerPaused;
ms_filter_unlock(f);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment